SEATTLE -- The Mariners finally landed the established shortstop they've long been trying to find.

To do it, they had to part with a talented young pitcher who still has the potential to blossom.

Seattle and Arizona pulled off a five-player trade on Wednesday night, with the Mariners acquiring speedy infielder Jean Segura and the Diamondbacks getting right-hander Taijuan Walker as the centerpieces of the deal.

Segura immediately projects as Seattle's leadoff hitter and starting shortstop, solidifying an infield that already includes Kyle Seager at third base and Robinson Cano at second. Segura hit .319 with 20 home runs and 63 RBIs last season for the Diamondbacks, led the National League with 203 hits and posted a career-high 5.7 WAR.

"Segura was one of the premier offensive players in the majors last season," Mariners general manager Jerry Dipoto said. "His combination of average, power and speed is extremely difficult to find, especially at a position like shortstop and at the top of our lineup.

"We believe pairing him with Robinson Cano gives us tremendous offensive potential in the middle of our infield."

But getting Segura meant the Mariners had to give up on the inconsistent Walker, a power arm who has showed occasional flashes of brilliance.

"It's always hard. It's hard any time you give up talent like Taijuan," Dipoto said. "Frankly, you have to give to get ... and Segura fit this club."

Arizona also obtained shortstop Ketel Marte, while Seattle received outfielder Mitch Haniger and left-hander Zac Curtis.

Jean Segura, above, and Jose Altuve were the only two players last season with 200 hits, 20 home runs and 30 steals. The last player to do it prior to 2016 was Jacoby Ellsbury in 2011. Daniel Shirey/Getty Images

The addition of Walker could help a dreadful Arizona pitching staff that posted a 5.09 ERA last season, tied with Minnesota for worst in the majors. He joins a rotation that includes ace Zack Greinke, Shelby Miller, Patrick Corbin and Archie Bradley.

The Diamondbacks finished 69-93 last season, fourth in the NL West.

A touted prospect, the 24-year-old Walker went 8-11 with a 4.22 ERA and 119 strikeouts in 25 starts for Seattle last season. He would be outstanding one game and then struggle the next.

"Young, controllable pitching is hard to find, and adding Taijuan to the rotation gives us significant depth in that area," new Arizona general manager Mike Hazen said.

"In Ketel, we believe we have acquired a talented, switch-hitting shortstop to join a very solid core of young middle infielders."

Segura is also an immediate upgrade at shortstop for Seattle, which went 86-76 last season and finished three games out of a playoff spot.

"This trade made more sense for where our roster is, and Jean Segura fit this club about as well as any player we were looking at," Dipoto said.

Information from The Associated Press was used in this report.