ST. LOUIS (TNS) — For weeks, Royals starting pitchers have struggled to both give manager Ned Yost length and their offense a chance to breathe.

They've dug themselves into early ruts, allowing 19 first-inning runs through 20 games in May after allowing just 16 first-inning runs in the first 28 games of the season. They've often labored just to get through five innings.

But on Tuesday at Busch Stadium, Jason Hammel bucked the trend as the Royals beat the Cardinals, 5-1.

Hammel hadn't seen a digit entered into his personal win column since Sept. 6. In 13 starts since he beat the Tigers in Detroit late last season, he'd amassed an 0-8 record and a 7.28 ERA.

For the Royals, the desperation that accompanies a losing streak this time only lasted a few days. They last led in a game on Friday, when Jakob Junis and the bullpen held the Yankees to two runs in a 5-2 win.

But Alcides Escobar remedied the situation in the fourth inning Tuesday, shooting a two-out RBI double into the left-field corner to send home Whit Merrifield with the go-ahead run.

Outfielder Alex Gordon supplied the Royals' first bit of offensive energy. In his first at-bat against Cardinals starter Luke Weaver, Gordon barreled a first-pitch fastball left over the plate and crushed it 417 feet into the lawn beyond the center-field fence. The homer tied the game at 1 in the second inning.

After Escobar's double, Salvador Perez extended the Royals' lead to 3-1 with a solo homer leading off the sixth inning.

Hammel, meanwhile, worked around two-out trouble — he allowed six base-runners after getting two outs in three separate innings — and limited Jose Martinez, the former Royals farmhand who entered the game ranked ninth in the National League in batting average (.311), to one hit.

The outing, which lasted seven innings as he yielded nine hits and struck out six, provided Hammel his fifth quality start of the year. He threw 89 pitches.