Australia and the European Union have agreed a sweeping free trade deal after eight years of negotiations.

The deal signed in Canberra is worth about A$10bn ($7bn; £5.2bn) and was described as a mutual win-win by Australia's prime minister and the visiting European Commission President Ursula von der Leyen.

She described the deal as having a focus on collective resilience in a world that is deeply changing.

As well as removing almost all tariffs on trade, the two sides agreed to increase co-operation on defence and critical minerals.

European carmakers welcomed the deal but farmers in both Europe and Australia were unhappy at export quotas agreed for Australian beef and lamb.

The amount of Australian beef allowed into the EU is set to increase more than tenfold in the next decade, but Australian farmers had wanted more, while European farmers were opposed to increases.

Tuesday's accord in Canberra is the latest trade deal struck by Brussels as it tries to diversify its global trading relationships, given the fast changing geopolitical landscape and unpredictability of US President Donald Trump.

In January the EU and India announced a landmark trade deal after nearly two decades of on-off talks.

Another major trade deal the EU struck with the Mercosur bloc of South American countries was recently derailed in the European Parliament, amid criticism from the farming lobby.

Today we are telling an important story to a world that is deeply changing. A world where great powers are using tariffs as leverage and supply chains as vulnerabilities to be exploited, von der Leyen told a news conference in Canberra - a nod to Trump's use of tariffs and China's control of the critical minerals market.

She added that trust matters more than transactions, noting Australia and the EU had a unique relationship that was built for the long term.

What's in the deal? Beef, wine and defence

Under the deal, almost all EU tariffs will be lifted on Australian agricultural products such as wine, fruit and vegetables, olive oil, seafood, most dairy products and wheat and barley.

This will mean a saving of about A$37m for local wine producers and exporters, the government said.

For Australian consumers, the deal will mean cheaper European wine, spirits, biscuits, chocolates and pasta.

The deal means Italian-style sparkling wine made in Australia can still be sold as prosecco domestically, though the name will be phased out over 10 years for exports.

Australian producers can also continue to use names including parmesan though feta will be subject to grandfathering and lengthy phase-out periods.

The issue of food naming rights is sensitive in both Europe and Australia and Australia is now the only country outside of Italy to have secured EU permission to use the name prosecco.

Referring to the matter, Australian Prime Minister Anthony Albanese noted the country's modern history was built on migrants.

That's why whether it's Greeks coming here and creating feta, or Italians coming and doing parmesan or people from Eastern Europe doing kransky sausages - it's a connection with Europe.

The trade agreement was a perfect balance, von der Leyen said, as it will be easier for Australians to export to the EU while more EU-made goods will be available in Australia.

But Andrew McDonald from Meat and Livestock Australia said the deal on meat exports was not a fair outcome for Australian farmers who had wanted an annual quota of at least 50,000 tonnes - the deal allows for about 30,000 tonnes, up from 3,389.

This is unquestionably a missed opportunity for Australia's red meat producers, processors and exporters, he said.

European agriculture lobby group Copa-Cogeca criticised the deal for piling pressure on a sector it said was already hit by earlier trade accords.

The cumulative impact of successive trade agreements makes these concessions unacceptable, it said in a statement.

The new security and defence partnership will see greater co-operation in the defence industry, counter-terrorism, space and maritime security.

Von der Leyen also announced greater co-operation on several critical minerals projects between Australia and the EU, including lithium and tungsten.