HOUSTON (AP) — NFL owners voted Tuesday night to allow the St. Louis Rams to move to a new stadium just outside Los Angeles, and the San Diego Chargers will have an option to share the facility.

The Oakland Raiders, who also wanted to move to the area, were left out of the deal, but could move to Los Angeles if San Diego doesn’t, Commissioner Roger Goodell said.

READ MORE: New Haven Firefighter Killed, Another Critically Injured Battling Early Morning Blaze

The moves end the NFL’s 21-year absence from the nation’s second-largest media market.

The compromise– the Chargers and Raiders wanted to share a new stadium in Carson, California, and the Rams wanted to move to nearby Inglewood — was approved 30-2 after the other options did not get the 24 votes needed for approval.

READ MORE: Police: 3 Teens Hurt After Stolen Car Hits Multiple Vehicles, Including Unmarked Police Car

The Chargers can continue to negotiate with San Diego for a new stadium deal, while keeping the option of joining at the Rams and owner Stan Kroenke at the $1.8 billion complex he is building.

The Rams — based in the L.A. area from 1946-94 — will play in a temporary facility — probably the Los Angeles Coliseum — until the new stadium is ready, most likely for the 2019 season.

MORE NEWS: New York Weather: CBS2's 5/12 Wednesday Afternoon Weather Headlines

(Copyright 2016 by The Associated Press. All Rights Reserved.)