MIAMI -- Marlins second baseman Dee Gordon has cashed in after posting one of the best seasons in club history. The two-time All-Star on Wednesday night reached agreement on a five-year, $50 million contract, according to multiple sources.

The pact buys out Gordon's three arbitration years and two years of free agency, keeping the 27-year-old a part of the team's core through at least 2020. The contract also includes a $14 million vesting option for '21.

• Hot Stove Tracker

The Marlins, who acquired Gordon from the Dodgers as part of a seven-player trade at the 2014 Winter Meetings, have not confirmed the deal, which was first reported by Ken Rosenthal of FOX Sports.

Since the 2015 season ended, the Marlins made it clear signing Gordon to a multiyear deal was a top priority. Gordon also expressed interest in a long tenure in Miami, where he won the National League batting title in his first season with the organization.

Last year, Gordon became the first NL player since Jackie Robinson in 1949 to pace the league in batting average (.333) and stolen bases (58).

The agreement comes ahead of Friday's salary exchange deadline. Gordon was entering his second season of arbitration after he earned $2.5 million last year.

The Marlins have indicated that Gordon was their only arbitration-eligible player being considered for a multiyear deal.

Now, the team has seven players who have filed for arbitration it hopes to sign before heading to a hearing -- Jose Fernandez, Adeiny Hechavarria, A.J. Ramos, Tom Koehler, Carter Capps, Bryan Morris and David Phelps.

Had a multiyear deal not been reached, Miami and Gordon's camp were weighing the possibility of signing a one-year deal for 2016, while continuing to discuss an long-term pact through Spring Training.

Gordon did it all in 2015, pacing the Majors in steals and hits (205). He capped the year by winning his first Rawlings Gold Glove and Louisville Silver Slugger awards. Gordon also won a Wilson Defensive Award.

The Marlins now have three core position players signed long-term: Gordon, right fielder Giancarlo Stanton and left fielder Christian Yelich.

Joe Frisaro is a reporter for MLB.com. He writes a blog, called The Fish Pond. Follow him on Twitter @JoeFrisaro and listen to his podcast.