All-Star second baseman Dee Gordon agreed to a contract extension with the Miami Marlins Wednesday night.

According to Fox Sports, the extension is for five years and $50 million with a $14 million vesting option for a sixth season. Gordon’s extension covers the final three years that he was eligible for arbitration. The extension also covers Gordon’s first two years of free agency.

Gordon, who had spent the first four seasons of his career with the Los Angeles Dodgers, was acquired by the Marlins last year in a trade with the Dodgers. He hit .333 and had 58 stolen bases, which led the National League, and won the National League batting title last year, according to ESPN. Gordon also had 46 RBIs and four homeruns and he also led the league with 205 hits. He also made the All-Star team for the second time and won the Gold Glove and Silver Slugger Awards last year. Gordon has hit .293 and has 188 stolen bases in his five-year career.

The Marlins now have three players with long-term deals, Gordon, Giancarlo Stanton and Christian Yelich. They were 71-91 last year and finished third in the NL East.