Buzzard Point in Southwest Washington, near South Capitol Street and Potomac Avenue and across from Nationals Park, in July 2013. The site is proposed for a new Major League Soccer stadium for the District. (Pablo Martinez Monsivais/AP)

The D.C. Council put finishing touches Wednesday on plans for a 20,000-seat Major League Soccer stadium, concluding a decade-long search for and months of negotiations over a permanent home for the D.C. United franchise.

With the vote, the team secured a deal that could get it out of the aging RFK Stadium as soon as 2017. And Mayor Vincent C. Gray, with about two weeks left in office, secured a legacy.

The final vote was matter-of-fact, with the council’s 12 members approving the deal unanimously.

A companion funding bill also passed unanimously Wednesday, authorizing nearly $140 million for the project — including $33 million in shifts from other projects and $106 million in new borrowing.

That funding is intended to cover roughly $89 million in land-acquisition costs, plus $46 million in costs to clear the stadium site and prepare the necessary infrastructure. Also included are $4.5 million in community benefits, most of that total for the establishment of a Circulator bus route in the area.

The deal requires the team’s owners, led by Indonesian media magnate Erick Thohir, to finance and build a stadium on the site, a few blocks southwest of Nationals Park. The stadium is expected to open for the 2017 Major League Soccer season.

The last remaining step for the District to acquire the needed land is to either negotiate a deal with developer Akridge for property it owns in the stadium’s footprint, or to take it by eminent domain. Akridge had been pursuing a land swap that would have given it the Reeves Center municipal building on U Street NW, an idea the council rejected. A land swap with Pepco will provide the District with land on Buzzard Point and the utility with a parcel near Mount Vernon Square.

Jason Levien, the team’s managing partner, said D.C. United would now turn toward financing for the stadium, with an eye toward opening in 2017.

“We’re raring to go,” he said. “We feel that we can move expeditiously to make this happen.”

Levien said building the stadium remains an “ongoing process.” Before the deal passed, the team had sought to make it more favorable, with Levien working as late as Tuesday afternoon to try to reinstate a sales-tax break that Gray had approved but that the council removed.

“We think we have a real partner here,” Levien said. “We’re going to continue that dialogue until we have a first-class product.”

D.C. United has been sold twice since the team began trying to build its own venue, something most MLS clubs have. The team says it lost more than $5 million this season even though it made the playoffs, but a newly completed stadium is likely to dramatically increase the franchise’s value and could provide United a path to profitability.

Though the council did not pass the exact plan proposed by Gray, the votes gave the outgoing mayor a signature economic development project, one that neither of the two preceding mayors were able to accomplish.

Following the council action, Gray issued a statement contending that his plan was superior but saying the stadium “will spur important development along the Anacostia River, catalyze economic activity in a neighborhood that sorely needs it and create jobs for District residents.”

Council member Muriel E. Bowser (D-Ward 4), who becomes mayor next month, orchestrated the largest change to Gray’s original proposal — putting borrowed money into the deal rather than the Reeves Center. As mayor, she will have to contend directly with the limited borrowing capacity that will result from the stadium deal, which pushes the city precariously close to its debt ceiling.

Council member David A. Catania (I-At Large), in his final meeting before he steps down, raised concerns about how the debt could affect future spending priorities — such as two new middle schools, Metro expansion plans and major developments envisioned for the former Walter Reed Army hospital and the former St. Elizabeths Hospital campus in Southeast.

“Just to be clear, we are putting ourselves in a very, very tight place,” Catania said.

Bowser and Chairman Phil Mendelson (D) acknowledged that hundreds of millions of dollars of needed capital improvements remain but said the stadium would not prevent the District from finding the money for other priorities.

Bowser said there is probably $1 billion worth of capital needs in the city, including an increased commitment to affordable housing that she has promised.

“We are making this investment, and we all have to work together to make sure that we meet the infrastructure needs of our city,” she said.

For fans, the approval brought certainty — for the first time in years — that the team will not have to leave town to get a new stadium. Jason Anderson, a United fan from Edgewater, Md., took the day off work to attend the final vote.

“I’ve been following the team since the very first game,” said Anderson, 32. “It just means a tremendous amount to know that there’s no threat of the team departing. It’s a big weight off my shoulders.”