TAMPA, Fla. — Corey Kluber overcame occasional wildness, allowing two runs and four hits over four innings in his second spring start, and the New York Yankees beat the Pittsburgh Pirates 7-5 on Saturday.

Kluber is a two-time Cy Young Award winner with his third team in three years. He has thrown just one official inning since being hit on the right forearm by a comebacker in May 2019 and tearing a muscle in his right shoulder in his Texas debut last July.

Kluber hit two batters, threw a wild pitch and allowed a third-inning solo homer to Troy Stokes Jr. on Saturday. He struck out two in an outing in which the Pirates went down in order just once.

“Some pitches, probably, could have been located a little better, been a little sharper,” Kluber said. “The home run, first pitch, left it a little too much over the plate. Definitely some stuff to work on. Fine-tuning location, things like that.

“I was happy with the way I felt physically.”

The right-hander allowed a leadoff double and hit a batter in the first inning but got out of the jam with a double play. After a perfect second, Kluber gave up Stokes’ homer and then avoided further damage by working out of a two-on, one-out situation.

Kluber, who turns 35 in April, struck out three over two perfect innings in his other start on March 3 against Toronto. He had a live batting-practice session five days later.

After losing to the eventual American League champion Tampa Bay Rays in a five-game division series last year, the Yankees allowed Masahiro Tanaka, James Paxton and J.A. Happ to become free agents. They signed Kluber to a one-year, $11 million contract and acquired Jameson Taillon from Pittsburgh for four prospects.

“Looks like himself,” Yankees second baseman DJ LeMahieu said. “Ball’s moving all over the place.”

New York’s projected rotation also includes ace Gerrit Cole and Jordan Montgomery. Deivi Garcia and Domingo German are among the candidates for the fifth starter spot.

The Associated Press contributed to this report.