The St. Louis Rams and the San Diego Chargers have been green-lit for a move to Los Angeles.

The National Football League's 32 team owners voted Tuesday to give the Rams approval to move to Los Angeles for the 2016 season, and the Chargers the option to join them within the next year, NFL Commissioner Roger Goodell announced Tuesday night.

The Rams have been given the go-ahead to move to a new stadium in Inglewood, the site they had initially proposed, effective immediately. The Rams' will play at the L.A. Coliseum until their new stadium opens in 2019, Goodell said.

The Chargers have been given one year to work out a deal with the Rams that would also bring them to Inglewood. The Oakland Raiders, who agreed to disband a joint-venture with the Chargers, will be given the first option to move to Los Angeles if the Chargers fail to work out a deal.

In addition, the Chargers and the Raiders have each been promised $100 million for a new stadium in their respective markets, should they choose to stay where they are now.

In his remarks on Tuesday night, Goodell called relocation "a painful process" but said the solution was the best possible outcome for the league.

The final vote among the owners was 30 in favor of the Rams-Chargers option, and 2 in opposition. Relocation proposals require at least 24 votes for approval.

Related: NFL's Los Angeles relocation decision rests on league elders

The deal, which was struck after a day of meetings in Houston, brings an end to a 21-year-period in which the nation's second largest city was without a professional football team.

The move is a homecoming for the Rams, who first moved to Los Angeles from Cleveland in 1946 and left California for St. Louis in 1995.

But it's not sitting well with officials in Missouri.

"The NFL ignored the facts, the loyalty of St. Louis fans, who supported the team through far more downs than ups, and the NFL ignored a strong market and viable plan for a new stadium," St. Louis Mayor Francis Slay said in a statement.

St. Louis County Executive Steve Stenger tweeted that he was "bitterly disappointed" with the news.

"This region is fully capable of supporting an NFL team," he said in a statement. "That team should have been the Rams. The NFL and (Rams owner) Stan Kroenke have displayed a callous disregard for the St. Louis area and its loyal football fans."

As a football fan and a lifetime resident of the St. Louis area, I am bitterly disappointed in tonight's news. pic.twitter.com/Kx105ZRrHY — Steve Stenger (@StengerSTLCo) January 13, 2016

Kroenke, meanwhile, said in a statement that this was "the most difficult process of my professional career." He described the move to California as bittersweet.

"St. Louis is a city known for its incredibly hard-working, passionate and proud people," he said. "Being part of the group that brought the NFL back to St. Louis in 1995 is one of the proudest moments of my professional career."

The Rams-Chargers option was a break from the original two proposals that owners were meant to vote on this week. The original proposals pitted the Rams' Inglewood bid against a joint Chargers-Raiders bid for a stadium in Carson.

In an initial vote on Tuesday afternoon, 20 of the team owners voted in support of a Rams-Chargers plan, indicating that the majority of the league favored this option. However, that was still short of the 24 votes needed to secure its approval.

Following the meeting, the NFL's Committee on Los Angeles Opportunities -- made up of six of the league's most influential team owners -- began working with the Oakland Raiders on a plan that would dissolve the Chargers and Raiders joint venture, clearing the way for the Chargers and Rams to move to Los Angeles instead.

The Raiders agreed to back out of the deal in exchange for additional loan money from the league that will be put to a new stadium in their home market.

The team owners then met again on Tuesday night before the final vote that gave the Rams and the Chargers clearance for their moves.

Dean Spanos, the chairman of the Chargers board, said in a statement that he would "be working over the next several weeks to explore the options that we have now created for ourselves to determine the best path forward for the Chargers."