Tenants of the San Pablo Avenue apartment building destroyed by a fire early this morning were resisting a controversial eviction , according to court records and interviews.The residents even obtained a restraining order against the building's landlord. And, now, their lawyer is calling for an arson investigation.Records also show that the West Oakland building's dangerous conditions were known to the landlord, master tenant, the City of Oakland, and other authorities.The building's landlord, Keith Kim, was seeking to evict Urojas Community Services , a nonprofit that leased part of the building for a transitional-housing program that served dozens of homeless and very-low-income people.But Urojas and some of its clients who lived in the building refused to leave.James Cook, an attorney with John L. Burris Law Offices who is representing Urojas, said in an interview that Kim initially tried to evict the nonprofit right after the deadly Ghost Ship fire last December. Most recently, Kim gave Urojas a 30-day notice to vacate the building , but Urojas was fighting this eviction.The legal battle had escalated in recent weeks."Next thing I know, I get up this morning, my client’s building is on fire, it’s up in smoke," Cook told the"I want it to be investigated as an arson."Two have been confirmed dead in the fire and 86 people are displaced.It's unclear what caused the blaze, but the structure has a recent history of numerous building code violations, including broken plumbing and heating, exposed wires, pests, electrical problems, and more.Urojas Community Services filed the most recent complaint with the city, alleging that Kim had "deferred maintenance," allowing the building to fall into a state of disrepair. This housing-habitability complaint was verified by a city inspector who went to the address on March 3, according to city records.The inspector noted that there was a major plumbing leak spilling sewage into the first and second floors. "The 3rd floor is occupied with squatters," the inspector wrote.According to court records, Kim and a group of men tried to physically evict some of the residents in February. In response, the residents sought a court restraining order against Kim.Tenant Brenda Corley, who also helped manage the Urojas program, wrote in a court document that Kim showed up with twelve men on February 14 to "forcibly remove items" and change locks."They threw our items into the street," Corley wrote. "The men threatened violence if anyone intervened."According to Corley's account, Kim also told the building's tenants not to pay rent to Urojas Community Services, the master tenant. And Corley accused Kim of calling the Alameda County Behavioral Health Care Services agency to ask that Urojas' funding be cut off. (The county helps fund Urojas' programs.)Thewas unable to reach Kim for comment, but a temporary restraining order was granted by the court on February 15 preventing him from physically evicting tenants from his building.The restraining order was later dismissed, on March 6, after Corley and Kim both failed to show up to a court hearing.Cook said that Oakland City Councilmember Lynette Gibson McElhaney had intervened in the dispute between Kim and Urojas to try to reach a deal. But Cook said that McElhaney was trying to resolve the situation by having Urojas vacate the building, and working with Kim to possibly secure it as an affordable-housing site.Gibson McElhaney did not return a call or email seeking comment.Oakland City Councilmember Lynette Gibson McElhaney and her staff toured the building in February, according to a building inspector's report. McElhaney was reportedly working with Dignity Housing West, Inc. to take over part of the building for an affordable housing center, a move that would have displaced Urojas.The federal Bureau of Alcohol Tobacco and Firearms and Explosives is on its way to conduct an investigation of the fire alongside the Oakland Fire Department.So far, one person has been confirmed dead, and several seriously injured. Other bodies could be hidden in the three-story building.The Alameda County Sheriff's office is flying a drone equipped with a thermal camera over the building to locate hot spots and search for survivors or victims.The fire comes almost four months after the deadly Ghost Ship fire that killed 36.Other city and court records show that the building's substandard condition was known to the landlord, Urojas, and other authorities.In May of 2016 a city building inspector found that a smoke alarm was missing in one of the units leased by Urojas from Kim.A lawsuit filed in August of last year by a woman who used to live in the building alleges that the complex had no locks on the doors, no heat, defective plumbing, inadequate wiring, and other serious defects, including "hazardous fluids and materials" on the premises.The woman filed a complaint with the city and felt the landlord and property manager had been given adequate time to fix the building's defects. Instead, the woman was sexually assaulted in August 2015, according to the lawsuit, due to the fact that her unit had no locks on the door.In 2013 Oakland building inspector Timothy Low cited the building's owner for "hazardous and injurious" conditions and hit Kim with $3,239 in fees.In 2005 city inspectors were called to the building to investigate a complaint that women and young children were living in overcrowded rooms infested with mold and leaky plumbing. "Babies are getting asthma and very sick," reads a building inspector's comments.In 1996 another building inspector found that the fire escape was "tied up so tenants cannot get away in case of a fire."Keith Kim bought the building in 1991 through a company called Mead Avenue Housing Associates, according to county records.