WACO, Texas (KXAN) — Despite walking 12 Baylor hitters, the No. 19 Texas Longhorns baseball team escaped Baylor Ballpark with a series win following a 7-6 nailbiter on Sunday.

The pitching staff took the Longhorns on quite an adventure in the 3-game series, issuing 26 walks and six hit batsmen combined. Texas won the opening game of the series Friday 11-9 and then dropped Saturday’s game 10-9.

MORE THAN THE SCORE: Stay up to date on sports stories like these, and sign up for our More than the Score sports newsletter at kxan.com/newsletters

On Sunday, senior center fielder Eric Kennedy launched his eighth home run of the season in the eighth inning which proved to be the difference. His solo homer gave the Longhorns a 7-5 lead, and Baylor could only muster a single run off relief pitcher Lebarron Johnson Jr.

The game went back-and-forth in the middle innings, but the Longhorns took the lead for good after the 3-run seventh. Porter Brown hit a double to left-center field to score Peyton Powell and Rylan Galvan smacked a 2-run single to center field to plate both Brown and Garret Guillemette.

Powell got the Longhorns on the board in the third inning with an RBI groundout, and then Texas scored two runs in the fifth via a Dylan Campbell RBI single and a Guillemette sacrifice fly.

Texas starting pitcher Travis Sthele had control issues in 4.2 innings. He walked eight and hit a batter, yet somehow only allowed two earned runs. On top of that, he also didn’t allow any hits and struck out one hitter. David Shaw pitched two-thirds of an inning to be credited with the win, and despite issuing three walks in three innings pitched, Johnson was credited with the save.

Kennedy and Jared Thomas accounted for six of the Longhorns’ 10 hits. Kennedy finished 3-for-5 with the eighth-inning homer and Thomas was also 3-for-5 with two runs scored.

For Baylor, starting pitcher Will Rigney struck out nine in five innings and allowed three earned runs on six hits.

In Saturday’s game, Baylor scored five runs in the bottom of the ninth to steal the win. Two of the runs came home on hit batsmen by Texas closer Zane Morehouse. Texas issued 10 walks in the game and hit three Baylor hitters.

Offensively, Texas had 13 hits with multi-hit games from Campbell, Kennedy, Powell and Guillemette. Guillemette went 3-for-4 with three RBIs, including a 2-run double in the eighth inning that gave Texas a 9-5 lead heading into the ninth before things fell apart.

Starting pitcher Charlie Hurley lasted just two-thirds of an inning with three walks and five earned runs allowed. Heston Tole and DJ Burke combined for seven scoreless innings until it unraveled in the ninth.

On Friday, the teams scored a combined 11 runs in the ninth inning in a wild one. Kennedy, Guillemetter, Brown, Galvan, Thomas and Jack O’Dowd all had two hits each. Guillemette drove in a pair of runs.

After scoring five runs in the top of the ninth to take what looked to be a commanding 11-3 lead, Baylor countered with four extra-base hits including a 2-run homer by Cole Tremain to cut the deficit to 11-9 before Texas reliever Max Grubbs was able to stop the bleeding.

Mitchell Daly hit an RBI triple for the Longhorns in the ninth.

Texas starting pitcher Lucas Gordon moved to 4-0 this second with six shutout innings. He allowed five hits and struck out four with a walk. He threw 102 pitches and forced Baylor into 10 fly ball outs in 23 batters faced.

Texas (26-12, 8-4 Big 12 Conference) plays a midweek nonconference game at 6:30 p.m. Wednesday against Abilene Christian at UFCU Disch-Falk Field. They’re back in Big 12 play against Oklahoma at home for a 3-game series starting Friday.