SCOTTSDALE, Ariz. — The Rockies on Wednesday struck an “11th hour” deal with Colorado after four years of difficult negotiation designed to keep the team at Coors Field for 30 more years.

The Rockies agreed to a $200 million, 30-year lease with the Metropolitan Baseball Stadium District, the state division that owns Coors Field. In trade, the Rockies will be allowed to lease and develop a valuable plot of land directly south of the stadium for 99 years. For that, the team will pay the district $125 million.

“This was difficult and long, but we’re going to have baseball in Colorado for three more decades,” said Matt Sugar, spokesman for the district. “The greatest benefit will be that the taxpayer won’t have to pay a dime.”

Major League Baseball approved the deal Wednesday morning. Coors Field, the third-oldest stadium in the National League, will remain the Rockies’ home through 2047, when the stadium will turn 53 years old. Only Wrigley Field in Chicago and Dodger Stadium in Los Angeles are older in the NL.

“We are proud that Coors Field will continue to be a vital part of a vibrant city, drawing fans from near and far and making our Colorado residents proud,” Rockies owner Dick Monfort said in a statement.

A 22-year lease between the Rockies and the district was set to expire Thursday. If the sides had failed to agree on a new deal, the lease would have rolled over for five more years. But the Rockies in October indicated they were not interested in that extension option.

The Rockies will pay about $2.5 million a year in rent, plus the lease on the new land, totaling $200 million over the term. Their previous lease cost about $100,000 per year in rent and $900,000 in annual capital costs. Most of the money the Rockies will pay to lease the LoDo land will be front-loaded in the first 30 years.

The district and the Rockies each commissioned studies that determined capital improvements over the next 30 years — everything from sewer lines to new seats to internet access — would cost about $200 million. To raise those funds, the district considered and rejected several ideas, including a new sales tax, a seat tax and direct funds from the state and city, among other options.

Instead, the Rockies used the negotiation to bargain for a piece of land across 20th Street, south of Coors Field. The plot, currently a parking lot, sits between Jackson’s sports bar, Fado Irish Pub and the ChopHouse steak restaurant.

When the stadium opened in 1995, two years after the Rockies’ first season, Denver’s Lower Downtown neighborhood boomed and real estate prices shot up. Denver previously zoned that plot for an eight-story building that can include retail, office and residential spaces. That zoning remains in place.

The Texas Rangers last year got voter approval for a $1 billion new stadium, half funded by taxpayers, to replace Globe Life Park in Arlington. That stadium, which opened one year before Coors Field, will be torn down for the new field. And the Atlanta Braves this season will open SunTrust Park outside the city, a $622 million new stadium that cost the public about $400 million. It replaces Turner Field, a downtown stadium that opened two years after Coors Field.

“We wanted to lock them up for 30 years,” said Bob Lee, a director on the seven-member district board who, with Jim Basey, led the committee in charge of the negotiation.

Coors Field was built with funds from a 0.1 sales tax that paid $162 million. For the district, the land swap avoided having to ask for more public funding for stadium upkeep, Sugar said.

“We struggled and struggled to not have to go back to the taxpayer,” he said.

In 2014, in response to a running competition among bars and restaurants around the stadium, the Rockies used part of the money they owed the district for annual upkeep to build a rooftop above right field. New construction lopped off the third deck and built a two-story section that fans often refer to as a “party deck.”

The St. Louis Cardinals in 2014 opened the “Ballpark Village” area across the street from Busch Stadium, a team-owned area that includes retail, restaurants, entertainment and parking.

Since its inception, Coors Field’s deal is unique among stadium contracts between pro sports teams and cities. The Rockies do not own their own home, and neither the team nor the district owns potentially lucrative stadium naming rights. The Coors company bought in as a limited partner in the original Rockies investment group in 1990. In exchange, the company received naming rights in perpetuity.

“It really did come down to the 11th hour,” Lee said. “It sure feels good now.”