BEIRUT — Cans of paint thinner and other combustible material may have been stored alongside highly explosive ammonium nitrate in a Beirut warehouse and then caught fire, igniting the blast that devastated the city, according to a fire official at the port.

Investigations are not yet complete, but accounts of port workers suggest that hazardous materials were stored together inside Warehouse 12, said Lt. Michel el Murr, head of search and rescue for the Lebanese fire crew at the port.

Vapor from paint thinners can ignite in the air and cause fires in unventilated, hot conditions. Fuel may also have been stored there. Murr said teams searching the site have also found evidence of fireworks and hydrocarbons, but there was no sign of munitions.

Businessmen with knowledge of the port confirmed that the warehouse was specifically used for storing hazardous flammable materials.

“It’s extremely dangerous,” said Murr, who lost 10 of his colleagues in the blast. “It’s wrong to put this all in the same place. We are in a place where the temperature in the summer is crazy.”

The revelation that government officials had allowed 2,750 metric tons of ammonium nitrate to be stored for at least six years on the edge of a city home to more than 2 million people has enraged the Lebanese public, which was already reeling from the country’s rapid economic decline. The government resigned Monday following protests, with Lebanese taking to the streets again on Tuesday following a vigil for the one-week anniversary of the blast.

Experts say that if such a perilous mix of hazardous materials had been stored in one place, it would represent gross negligence.

“It’s madness, total madness that they would do that,” said Jeffrey Lewis, an arms control expert at the Middlebury Institute of International Studies. “There are so many things that could go wrong. It’s an egregious mistake.” He called it “shocking” that such material would have been stored under such conditions in a built-up area.

Many paint thinners have what’s known as a “flash point” of around 101 degrees Fahrenheit. On Aug. 4, the date of the explosion, temperatures in Beirut reached nearly 90 degrees, but were probably higher in an uncooled warehouse. Murr said there was no air-conditioning system in the warehouse, with small windows providing the only ventilation.

Lt. Andrea, a platoon leader with the French search-and-rescue team, said that the warehouse was used for other chemicals and flammables but that it is still unknown if they started the fire that triggered the explosion that killed at least 171 people.

Lt. Andrea, who declined to give his last name in line with French government security protocol, said teams were trying to identify what the products in the warehouse were to see if they were the cause.

“We don’t know what the cause was,” he said.

Elie Zakhour, chairman of Beirut’s International Chamber of Shipping, said Warehouse 12 was specifically designated for the storage of flammable materials if they had to be kept in port and were not picked up by the ­receiver.

Letters have shown that customs authorities repeatedly warned a judge about the presence of the explosive material in the port after it arrived aboard the MV Rhosus and that they asked for advice about what to do with it.

Lebanese State Security officials said Tuesday that they became aware of “security flaws” at Warehouse 12 last year and reported the issue to their command, which ordered an investigation and asked port authorities to take the “necessary measures” to avoid an accident.

The explosion came at a time when many Lebanese are being pushed into poverty as the value of the local currency has dropped. The blast, which ripped apart the port’s grain silos, has escalated the food crisis.

The United Nations said Tuesday that it was sending tens of thousands of tons of wheat flour to Lebanon to prevent a food shortage. The first shipment will arrive in the coming days and supply Lebanese bakeries for one month, the U.N. humanitarian coordination agency said in a report. It estimated Lebanon’s current wheat flour reserves as covering just six weeks of market needs as the country faces multiple crises.

“In the wake of the damage to the grain silos and stocks at the port, [the World Food Program] will deliver 50,000 metric tons of wheat flour to Beirut to stabilize the national supply and ensure there is no food shortage in the country,” the report said.

It said repairs to Beirut’s port facilities, which remain inoperable, were “essential to avoid interruptions and disruptions in food supply lines.”

The assistance from the United Nations came as a senior U.S. aid official toured affected parts of Beirut on Tuesday. John Barsa, acting administrator of the U.S. Agency for International Development, briefly joined rescue workers who were shoveling mounds of glass into the back of a truck. It is rare for a U.S. official to make such a high-profile visit to central Beirut.

“Certainly, every disaster is a heart-wrenching crisis, but especially more so when it is not a natural disaster like a tornado or a hurricane or an earthquake,” Barsa said. “When you see devastation like this that was caused by acts that were not hands of God, that is even more heart-wrenching.”

His visit coincided with the delivery of relief supplies, including emergency medical kits, USAID said in a statement.

Sarah Dadouch and Louisa Loveluck in Beirut, Suzan Haidamous in Washington, Erin Cunningham in Istanbul and Asser Khattab in Paris contributed to this report.