Chinese consulate San Francisco fire
The damaged entrance of the Chinese consulate in San Francisco is seen after an arson attack Reuters

A Chinese man confessed setting fire to the Chinese consulate in San Francisco claiming he was driven by voices, the FBI said.

Yan Feng, 39, called police to hand himself in over New Year's Day arson attack and was arrested at his home in Daly City, a San Francisco suburb.

Feng told detectives he drove to the consulate carrying two buckets of gasoline, poured them onto the diplomatic compound's front door and tried to ignite the blaze using his passport, an FBI affidavit said.

As the passport failed to burn he eventually lit the fire with a lighter before he drove away.

"He targeted the Chinese Consulate because all the voices he had been hearing were in Chinese, and the Chinese Consulate had to have been involved," the affidavit read.

Feng, who has permanent resident status in the US has been charged with damage to property of a foreign government and arson.

San francisco arson attack chinese consulate
A charred national emblem of the People's Republic of China is seen outside the Chinese consulate Reuters

FBI Special Agent David Johnson said authorities did not believe terrorism, politics or civil rights were involved.

"Right now, we're looking at this as purely a criminal matter," Johnson said.

No one was injured in the attack, which charred a doorway and damaged the consulate's lobby.

"We have noted the efforts made by the US side to investigate into the arson attack and require that the perpetrator be brought to justice," a spokesperson for the consulate said after the arrest was made.

"We will follow up closely with the US side on the trial. We urge the US side to learn lessons from this incident, take effective measures to ensure the safety, security and dignity of Chinese diplomatic and consulate missions and staff in the US and prevent the recurrence of similar incidents."

In 2008 the Chinese consulate in San Francisco was similarly attacked, when a group of people poured a flammable liquid onto the building's back gate and set it ablaze.