OAKLAND — A two-alarm fire Tuesday night heavily damaged one of Oakland’s first branch libraries, an almost century-old landmark building that has been vacant for years, authorities said Wednesday.

One firefighter was injured in the blaze, which officials suspect was started by squatters cooking.

A much smaller fire that was also believed to have been sparked by squatters ignited at the building two weeks ago but it was quickly extinguished and the damage was not as extensive as Tuesday’s fire, officials said.

Tuesday’s fire was reported at 7:01 p.m. at the two-story Spanish Colonial Revival style building at 1449 Miller Ave. in East Oakland.

When firefighters arrived on the scene, flames and smoke were coming from the second floor.

A second alarm was called at 7:14 p.m. Firefighters had to force entry to the building to battle the fire.

The fire was announced under control at 7:54 p.m.

The injured firefighter suffered a broken ankle and taken by ambulance to a hospital.

The fire apparently started in the building’s basement and spread to the upper floors. Authorities believe the fire was started by squatters.

An exact damage figure was not released but officials said the entire first floor was basically destroyed.

The building is listed on the National Register of Historic Places and is also an Oakland City Landmark. Construction on the building began in July 1917 and it opened on March 14, 1918.

It was the second of four branch libraries in Oakland built with $140,000 in funds from a Carnegie Foundation grant obtained in 1914 by then Oakland City Librarian Charles Greene. The Carnegie Foundation provided funds to cities for libraries to bring books closer to the people.

Over the years the branch had several different names, including the 23rd Avenue branch, the Ina Coolbrith Branch (named in honor of the city’s first librarian) the Miller Library, and finally the Latin American Branch.

It closed as a library in the late 1970s because there was no city money available for necessary seismic upgrades.

Other groups had used the building but it has been vacant for some time, officials said.