SAN DIEGO (AP) — The San Diego Chargers are moving to Los Angeles, where they will join the recently relocated Rams in giving the nation’s second-largest media market two NFL teams for the first time in decades.

Team chairman Dean Spanos made the announcement Thursday in a letter posted on the Chargers’ Twitter account.

Spanos cited the Chargers’ long history in San Diego. “But today, we turn the page and begin an exciting new era as the Los Angeles Chargers,” Spanos said in the letter.

The Chargers’ decision to move comes less than three months after San Diego voters resoundingly rejected a team-sponsored measure asking for $1.15 billion in increased hotel occupancy taxes to help fund a $1.8 billion downtown stadium and convention center.

They’re leaving behind a loyal fan base that cheered for Dan Fouts, Charlie Joiner and Kellen Winslow during the Air Coryell years in the 1970s and early 1980s, and for Junior Seau, Stan Humphries and Natrone Means on the Chargers’ only Super Bowl team in 1994.

San Diego could become a tenant in the stadium being built in Inglewood for the Rams if the Chargers exercise that option. If not, the Oakland Raiders would have the option to join the Rams in the L.A. area, though Raiders owner Mark Davis has indicated his intention to seek a move to Las Vegas.

Relations have been strained for years between the Chargers, who’ve sought a big public subsidy to replace aging Qualcomm Stadium, and City Hall, which has been beset by scandals and various economic crises.

Mayor Kevin Faulconer formed a task force in 2015 to try to find a stadium solution, but the Chargers didn’t like its recommendation and walked away from negotiations with the city and county. Faulconer recently met with team chairman Dean Spanos, and helped cobble together a $375 million package from the city, county and San Diego State, which also plays football at Qualcomm Stadium.

The Chargers would have to find a temporary home in L.A., either the Coliseum or the 27,000-seat StubHub! Center in Carson.

San Diego was given the option to move to L.A. after owners rejected a proposed shared stadium for the Chargers and Raiders in Carson, and accepted the Rams’ plans for Inglewood. The owners gave the Chargers and Raiders each an additional $100 million to try to make stadium deals in their home markets.

The NFL’s stadium and finance committees met Wednesday for about 3 1/2 hours to discuss relocation of the Chargers and Raiders. The fact-finding meetings mostly centered on the Raiders’ plan for a potential move to Nevada. No filings for relocation were made; Oakland has until Feb. 15.