Bartolo Colon, the portly righthander who earned loyal fans with his uncanny precision as a pitcher and slapstick unpredictability as a hitter, ended a colorful three-year marriage with the Mets by agreeing to a one-year contract with the Braves on Friday.

For all the good times, the end was inevitable. His late-career renaissance made his return little more than a luxury for the Mets, who expect to have enough pitching depth next season.

The Braves and Colon agreed to a $12.5-million deal, a source confirmed, pending the completion of a physical. It’s a hefty raise from the $7.25 million he made after signing a one-year deal with the Mets last offseason.

Colon, the 43-year-old marvel, is close to claiming a significant piece of baseball lore as the winningest pitcher born in Latin America.

The mark belongs to a native of Nicaragua, Dennis Martinez, who amassed 245 victories. Juan Marichal stands at 243 and Colon has 233. Colon needs 13 victories to set the record for wins by a Latin American pitcher and 11 to own the most wins among pitchers from the Dominican Republic.

That pursuit underpinned his decision-making upon reaching free agency, according to a source. And by excelling with the Mets in 2016, he positioned himself to chase records he values while also earning a raise.

advertisement | advertise on newsday

He went 15-8 with a 3.43 ERA in 34 games, 33 as a starter, and made the All-Star team.

It was yet another unexpected resurgence for Colon, whose late-career exploits have only been amplified by his defiance of age and a body type that has long drawn mockery. Listed at 5-11 and a generous 285 pounds, Colon posted his best season since making the All-Star team in 2012 with the A’s.

The year also included one of his signature achievements: the first home run of a big-league career spanning 19 seasons that began in 1997 with the Indians.

A comically inept hitter who has been shielded from batting by spending much of his career in the American League, Colon worked to improve his hitting when he signed with the Mets before the 2014 season.

The culmination of that work came when Colon hit a two-run homer off James Shields on May 7 in San Diego, an event that inspired joyous reactions on social media and encapsulated Colon’s grip on the fan base.

Mets videos

“This is probably the biggest moment of my career,” Colon said that night, an especially weighty comment given that he won the Cy Young Award in 2005.

But injuries nearly ended his career. From 2006 through 2010, he made only 47 starts, an average of about nine per season. He missed the entire 2010 season, underwent controversial stem cell treatments to revive his arm and promptly launched his second act, signing a minor-league deal with the Yankees.

Since then, Colon has been one of the game’s most durable pitchers, logging innings for the Yankees, A’s and Mets. In that time, he served a PED suspension and became tabloid fodder with the revelation of siring a second family.

None of it, however, seemed to dim his standing among the fans. Now Colon will chase history in a different locale, leaving a void with the Mets.

Teammate Noah Syndergaard made his feelings known, tweeting out an animated GIF of the glass case of emotion scene from “Anchorman” in which Will Ferrell bawls uncontrollably in a phone booth. The tweet included an epitaph: “Feelings right now,” followed by a single-tear emoji and the hash tag featuring Colon’s nickname, “big sexy.”