With open arms, the Padres welcomed Andrew Cashner back to the rotation Saturday night.

They even celebrated with some timely hitting for a change.

His elbow pain-free, the Padres’ ace ran his fastball up to 98 mph, threw that previously troublesome slider more and more as his night eased on and retired the final 16 hitters he faced in a much-anticipated return that somehow ended in a 4-3 walk-off win even after the Nationals beat up on the Padres’ bullpen immediately after Cashner exited with six clean innings.

Down to their final out in the ninth, Yonder Alonso atoned for Nick Vincent’s three-run hiccup in the seventh with a game-tying homer and Cameron Maybin dumped a game-winning single to right two innings later as the Padres avoided slipping a season-high eight games below .500.

“They all count,” Maybin said after driving in his second run of the game on the first walk-off hit of his career. “That was a big one. It’s a huge win. Now we can go for the series win tomorrow.”

At the very least, the Padres will have momentum on their side.

Dale Thayer, Alex Torres, Huston Street and Joaquin Benoit (2-0) each turned in a scoreless frame in relief to pick up Vincent, as well as an offense that stranded both of Rene Rivera’s doubles – one to lead off the eighth and another with one out in the 10th.

All told, the Padres went 2-for-9 with runners in scoring position, with Alonso following Chase Headley’s two-out single in the 11th with a walk that set up Maybin’s game-winner five innings after Cashner departed with a 2-0 lead and a dominant return from the disabled list.

The 27-year-old Texan struck out five, pitched out of trouble in the first and allowed just two hits and a walk in his first start since right elbow soreness triggered concern last month.

Needless to say, the time off wasn’t easy to swallow as the Padres sunk to 13 games off the Giants’ pace in the NL West.

“I pride myself on carrying a heavy workload and I haven’t been there,” Cashner said. “It’s been frustrating to watch from the side when your team is struggling.”