Europe was willing to lower its tariffs on automobiles and cooperate with the United States. But the Trump administration walked away.

That's EU trade commissioner Cecilia Malmström's account of last-minute talks with the Trump administration that failed to produce a breakthrough and led to the imposition of US tariffs on steel and aluminum from Europe.

Malmström said that the United States "closed the door" following the EU offers. The bloc has responded to the metals tariffs by filing a legal challenge and moving to impose tariffs on American products including bourbon and motorcycles.

"We do this because we have to," Malmström told CNN's Christiane Amanpour. "I'm not doing this with a happy smile, but this has to be the consequence."

Malmström said the European Union must fight back in order to protect global trading rules. She has called the US tariffs "pure protectionism" and "illegal" under rules governed by the World Trade Organization.

Related: CEOs are scaling back hiring and spending because of trade fears

Trump has frequently called out allies for being unfair on trade, arguing that they have high tariffs that block out American goods and lead to trade imbalances.

Malmström said that imbalances are about more than just trade and tariffs. They are also related to savings, tax systems, consumption patterns and the dynamics of supply and demand, she said.

The Trump administration has imposed steel and aluminum tariffs on other countries including Canada and Mexico. It has also said it will impose tariffs on $50 billion in Chinese imports.