The waiting is over. At least for now.

One week before the trade deadline, the Padres made a deal Monday, sending three veteran pitchers — Ryan Buchter, Trevor Cahill and Brandon Maurer — to the Kansas City Royals.

In return, the Padres received pitchers Matt Strahm and Travis Wood, plus 18-year-old Dominican prospect Esteury Ruiz, an infielder, and cash.

Ruiz originally signed with Kansas City as an international free agent in July 2015. This season he has played in the 21 games for the Royals’ Arizona Rookie League team, hitting .419 (36-for-86) with a .440 on-base percentage and .779 slugging percentage. He has 10 doubles, three home runs, 22 runs scored and nine stolen bases (in nine attempts). He primarily has played second base.

Straham, 25, recently underwent season-ending surgery to repair a patellar tendon tear. A 21st-round pick in 2012, he has appeared in 45 major league games (three starts), going 4-7 with a 3.81 ERA. This season, in 24 appearances (three starts), he was 2-5 with a 5.45 ERA, although opposing batters hit just .236 against him. In his minor-league career, the left-hander had 304 strikeouts in 251.1 innings.

Wood, 30, was 4-0 with a 2.95 ERA for the Cubs last year during their championship season, including a 2.84 ERA in the postseason. This season in Kansas City he has not been as effective, going 2-5 with a 5.45 ERA in 34.2 innings. According to a source, the Padres will pay only the league minimum salary for Wood, who is earning $4 million this year and $6.5 million in 2018; the Royals will pay the rest.

Buchter, Cahill and Maurer all had been rumored as trade candidates.

Buchter, 30, is a left-hander who had made only one major league appearance before coming to San Diego last year. He wound up pitching in 67 games with a 2.86 ERA as opponents hit just .160 against him. He had 78 strikeouts in 63 innings.

This season Buchter had appeared in 42 games, with a 3.05 ERA and a .199 opponents’ batting average. He had 47 strikeouts in 38.1 innings. He has one more season before he becomes eligible for arbitration.

Cahill, 29, is a Vista High graduate who joined the Padres in January. In 11 starts this season, he was 4-3 with a 3.69 ERA and 72 strikeouts in 61 innings. He recently spent seven weeks on the disabled list but returned July 4 and has made four starts since.

Cahill is earning $1.75 million and will be a free agent after the season.

Maurer, 27, joined the Padres before the 2015 season in a trade for Seth Smith. He had 13 saves last year and was 20-for-23 in save chances this season despite a 5.72 ERA. He is earning $1.9 million and is arbitration-eligible the next two seasons.