It turns out that new BART Police Chief Carlos Rojas’ departure from his last job — top cop in Santa Ana — was far from amicable.

Rojas joined the BART force in May and filed a legal claim against Santa Ana a month later, saying he had been forced to resign as police chief because he blew the whistle on city employees who may have been breaking the law.

The claim, typically a precursor to a lawsuit, says Rojas notified his City Hall bosses of “suspicions of illegal activity” involving certain employees, and that his bosses could have investigated. Instead, they pushed him out.

The claim blames everyone from the mayor and acting city manager to a pair of City Council members and the head of the local police union.

However, just what kind of illegal activity the chief might have known about isn’t spelled out in his claim, and neither Rojas nor his attorney is talking.

What we do know is that Rojas resigned after five years on the job, bringing an ignominious end to his 27-year-career in the department. At the time, he was facing a barrage of criticism over both his leadership and a wave of shootings in the city, and the police union was threatening him with a no-confidence vote.

“If he was doing such a great job, why did he leave?” said police union President Gerry Serrano. “He wasn’t terminated.”

Serrano says he has no idea what Rojas’ allegations of illegal activity involve, but called his claim against the city an embarrassment — to the ex-chief. “What a shame and a theft to this community that he now wants more money,” he said.

The claim cites a loss by Rojas of “significantly in excess of $10,000,” and says he was “forced to obtain employment at an unfamiliar department where he will earn less salary, expend considerably more in living expenses and will live apart from his family.”

That would be BART.

Rojas was making $244,656 a year as Santa Ana’s chief. BART officials tell us that as of July 1, Rojas was making $255,065.

Rojas’ attorney, Lawrence Lennemann, said he and his client “are not in a position at this time to make any comment.” But he did point us to an opinion piece on the Voice of OC website by Claudia Perez, who heads a local advocacy group.

Perez wrote that the police union spent $400,000 to back candidates in recent City Council elections who would do its bidding — including firing Rojas.

She added that Rojas ran into trouble with the union because “he fired certain police officers who had violated the law while at work.” Rojas’ legal claim is the first step toward “exposing the corruption within the city,” Perez wrote.

As for BART’s reaction to all this: “The general manager in consultation with the Board of Directors felt Carlos Rojas was the best candidate, and there is nothing about his relationship with his previous employer that changes that,” said spokesman Jim Allison.

Lovin’ it: The city has made a bid to buy one of San Francisco’s most intractable trouble spots — the McDonald’s restaurant at the corner of Haight and Stanyan streets — with the idea of replacing it with affordable housing.

“What a great opportunity,” said Board of Supervisors President London Breed, who has answered her share of complaints from neighbors about small-time drug-selling, loitering and other problems around the fast-food outlet across from Golden Gate Park.

McDonald’s spokesman Ron Rogers said the burger giant has a received “a letter of interest” from the city and that “the proposal is currently under review.”

The site’s problems were underscored Thursday when a man was shot and wounded inside the McDonald’s after an altercation. The restaurant was closed for two hours while police scoured the area looking for the suspect, without success.

Officials from San Francisco’s Real Estate Division were unavailable to discuss specifics of the city’s offer for the property, but the news was confirmed by both Breed and Mayor Ed Lee’s office.

“We are waiting to hear a response to our proposal,” Deirdre Hussey, the mayor’s spokeswoman, said Friday.

Lee and the supervisors have been pressing to build more housing in the city, and that includes the Haight. Breed, however, cautioned that nothing was set in stone, and “whether it’s affordable housing or anything else built, there will be a community process.”

The city has tried before to buy the McDonald’s site. We’re told the previous owner hoped to develop the site himself, but that plan ran up against resistance from neighbors.

In May 2015, City Attorney Dennis Herrera threatened to sue McDonald’s Corp., citing 1,100 calls to police over a three-year span for drug sales, fights, assaults and auto burglaries in the parking lot.

He eventually reached a deal requiring McDonald’s and its franchise holder to provide increased security and lighting and to pay the city $40,000.

Another franchisee, Peter Ou, took over in January. Tony Green, manager of neighboring Amoeba Music, said the crime situation has improved lately, but still, “people do find a way to hang out.”

Breed says Ou and McDonald’s have “tried to make the area safer and more comfortable for people, but haven’t been successful” — opening the door for the city to take another stab at buying the property.

San Francisco Chronicle columnists Phillip Matier and Andrew Ross appear Sundays, Mondays and Wednesdays. Matier can be seen on the KPIX-TV morning and evening news. He can also be heard on KCBS radio Monday through Friday at 7:50 a.m. and 5:50 p.m. Got a tip? Call (415) 777-8815, or email matierandross@sfchronicle.com. Twitter: @matierandross