District Mayor Muriel E. Bowser and D.C. United’s owners have finalized a stadium development deal to keep the team in D.C. provided that the District government secures the needed land by Sept. 30, according to multiple officials involved in negotiations.

Bowser (D) is expected to announce the deal formally at a Tuesday press conference, the officials said, likely ending the team’s contemplation of a move to Virginia.

Bowser tweeted the news shortly before 6 p.m. Monday and issued a press release saying the agreement would “add vibrancy to a neighborhood on the banks of the Anacostia River and generate jobs for District residents.”

Jason Levien, the team’s managing partner, said in the release that the agreement marked “a significant step forward for D.C. United and the District of Columbia.”

After the team’s discussions with Virginia Gov. Terry McAuliffe (D) and Loudoun County officials became public last week, the mayor’s office hastened negotiations with the team.

“We go after every deal. Some work out, some don’t,” said McAuliffe spokesman Brian Coy. “The governor believes if there are jobs to create, investment to bring back to Virginia, you can’t win unless you’re on the field.”

The basic deal, first negotiated by former mayor Vincent C. Gray and approved by the D.C. Council late last year, remains in place. The District would pay $150 million to acquire and prepare land on Buzzard Point in Southwest Washington. D.C. United would then privately finance a stadium of around 20,000 seats.

The project is expected to cost around $286.7 million and is expected to open for the 2018 Major League Soccer season.

Recent discussions have revolved around financial protections that members of Bowser’s economic team had added to the deal, some of which caused the team’s ownership to balk, according to one of the officials.

The officials shared details of the agreement on the condition of anonymity because the discussions were meant to be private.

D.C. officials asked the team to foot part of the bill for cost overruns, for instance, and provide collateral in case D.C. acquired the land but United failed to build the stadium.

In recent days, according to two individuals involved in negotiations, D.C. and the team agreed to split up to $20 million in cost overruns for acquiring land through eminent domain.

D.C. would still be on the hook for overruns beyond that, but one senior D.C. official involved in the negotiations said he viewed that possibility as “extremely unlikely.”

District officials had also asked that the team put $25 million in an escrow account that the city could take in case United failed to build the stadium, one source said. Ultimately, the two sides agreed to an escrow of $5 million.

United officials in turn agreed to sign a non-relocation agreement, three sources said, preventing them from moving the team to Virginia or elsewhere, provided that by Sept. 30 Bowser’s office gets D.C. Council approval to close the necessary streets, acquire the needed land and, if need be, file for eminent domain.

The team will also have to provide a stadium feasibility study to the city by Sept. 15, rather than by Nov. 15, two sources said.

Several Bowser administration official said that, although the timeline is aggressive, they believe they will have no problem hitting it.

The city has already negotiated land purchase prices for private parcels owned by Pepco, entrepreneur Mark Ein and a metal scrap yard. D.C. has not announced an agreement with another property owner involved, the developer Akridge, but is expected to invoke eminent domain in order to acquire the company’s land. Under the terms of the deal with the team, D.C. will have to begin the legal process of taking that land by Sept. 30.

A D.C. Council committee is scheduled to consider legislation Tuesday that would allow the closure of the streets that run through the stadium site in Southwest, including parts of Potomac Ave., R Street, S Street, First Street and Half Street.

Because the final changes don’t fundamentally affect the underlying agreement with the team, they are not expected to require separate approval from the D.C. Council. The council passed legislation last month extending the timeline for the deal and giving Bowser leeway to negotiate final details.

The agreement provides a framework for finalizing a deal more than two years in the making, but some risks remain. Capping the team’s cost overruns gives United more certainty about what its final costs will be but leaves District taxpayers open to having to pay more for more than $150 million of the project.

Last week, Bowser said she didn’t see a need to renegotiate with the team, calling the United offer a “very generous deal” and said she didn’t know how the team could “get a sweeter deal than what we have on the table.”

D.C. Council Chairman Phil Mendelson (D) said it appeared that since The Washington Post reported recently that the team was entertaining a counter offer from Virginia that Bowser’s office used the hearing as a deadline to reach an agreement on final details.

Mendelson said he could understand why the team may have been frustrated and appeared to be seeking assurances from D.C. Mendelson said he, too, had seen little evidence of momentum since the council gave final approval five and a half months ago.

“It’s not a criticism of the mayor, but what did the team get? I think they got some finality and things are buttoned down in a way that they weren’t,” he said.

Mendelson, however, added that under the terms released Monday, a stadium feasibility report now due before the city commits to buying the land at the end of September provides “outs for both sides” should cost estimates prove wildly off the mark.

But the chairman said he thinks the odds of the project derailing now are low. “I think we have a deal.”

This story has been updated to include comments from the mayor’s press release, the governor’s spokesman and Mendelson.

Aaron C. Davis and Laura Vozzella contributed to this report.

Follow Jonathan O’Connell on Twitter: @oconnellpostbiz