Craig Mitchelldyer/Portland Timbers
Crisis averted.

After a fraught, months-long process, the Portland Timbers announced on Monday afternoon that they have signed club captain and all-time leading goalscorer Diego Valeri to a multiyear contract extension using Targeted Allocation Money (TAM).

The deal represents a significant victory for the Timbers' front office, which gambled that it could bring Valeri back on a reduced contract and thus free a second Designated Player (DP) spot, as well as a victory more broadly for a club that has had little good news in recent months.

Losing Valeri over an unwillingness to pay him would have destroyed a reserve of supporter goodwill. It would have been the kind of blunder that poorly-run clubs often do make. The Timbers, in getting a deal done, deserve a significant amount of credit.

It was not an easy negotiation. Valeri has been the Timbers' highest paid player since he joined the club in 2013, and occupied one of the team's three DP spots in each of the last seven seasons.

His production, of course, has been commensurate with his compensation. Valeri has made the MLS All-Star team in five of his seven seasons, led the team in goals in four of those seasons, won the MVP award in 2017, and won the MLS Cup Final MVP award in 2015.

Valeri wanted to sign a two-year DP extension early in the year, but the Timbers held out — refusing to budge from their position that Valeri's new deal, for his age 34 and 35 seasons, be under the TAM threshold of $1.53 million.

Talks stalled. If Valeri felt that he was being undervalued or under-appreciated, he made a memorable statement when, after scoring a sensational goal on July 27, he ripped off his shirt and held it aloft in the direction of the Providence Park owner's box.

News of the stalled negotiation broke in September, and Valeri's conduct during the team's final home games of the season seemed to communicate that he was preparing to say goodbye.

The offseason began in October with Valeri's future very much up in the air. But the Timbers were always adamant that they would find a way to bring their captain back, and with Valeri's ties to Portland running so deep, reconciliation always seemed possible.

In the end, the Timbers got what they wanted — Valeri on a TAM deal — and the Maestro should be able to conclude his career in MLS in a city that sees him a saint. It's the absolute right conclusion to a fraught period between the Timbers and their greatest ever player.

It also means a great deal to Valeri, a player as committed to the culture of the club and city as the Timbers have ever had.

In a tweet posted several hours after the announcement, the Maestro wrote, "You are unique and everything I can say in words is not enough to express the love, gratitude and respect I feel for you. I am privileged to play for you. Know that I left, leave and will continue to leave everything for these colors, where we find and join together. Thank you."

With this most important piece of business out of the way, the Timbers' offseason should pick. The club has two open DP spots, Valeri's and Brian Fernandez's, and seem set to spend big on a striker before the season kicks off in late February.

There are likely a number of Timbers supporters who would rather have lost with Valeri next year than won without him. Now, with this announcement, things are looking up.