Image copyright Getty Images

When it comes to trade with the rest of the world, the European Union is sometimes accused of having high barriers and protecting its own producers.

It's an allegation that some supporters of Brexit have been making for some time.

The charge has had something of resurgence in the light of the renewed debate about exactly what sort of customs arrangement Britain should have with the European Union in the future.

But does it stand up?

The EU does certainly have barriers to trade, and they do, one way or another, raise the cost of imported goods.

But every country on the planet has some sort of barriers. So how does the EU compare?

Relatively low

Tariffs - taxes that are levied only on imported goods - are the most readily quantified and compared.

For the most part, the EU's tariffs are relatively low.

There are a number of ways of calculating an average. You can take a "simple" average, or you can weight the tariffs in line with the amount of trade that's affected. Both have drawbacks and advantages.

Image copyright Getty Images Image caption For the most part, the EU's tariffs are relatively low

Then you can look at "bound" tariffs, the amount that countries have pledged in the World Trade Organization that they won't exceed. Or you can look at applied tariffs, the amount they actually impose which can be lower, sometimes by a large margin.

On any basis, the EU's average tariffs are fairly moderate but certainly not the lowest. The lowest figure for the EU is the trade-weighted figure for applied tariffs (the most recent in the WTO database is 2015). It was 3%.

That's higher than the US (2.3%) and Japan (2.1%), but lower than Australia (4%) or Canada (but only just at 3.1%). Some developing countries have higher levels, such as 10.4% for Brazil.

But the major developed economies can't match Hong Kong, which has no tariffs.

Sector by sector

If you drill down into particular sectors, then you get a more varied picture. Tariffs on farm produce tend to be higher, including in the EU. The trade-weighted average is 7.8%, and that is a good deal higher than the US figure of 3.8%.

But if you want to sell agricultural goods into Switzerland there's an average tariff of nearly 30%.

One complaint sometimes made against the EU by its British opponents is about tariffs on goods from developing countries, notably from Africa.

Image copyright Getty Images Image caption Average tariffs on farm produce are higher in the EU than in the US

Although there are some tariffs, most African nations benefit from an EU arrangement that allows almost completely tariff and quota free access for their goods. It's known as Everything but Arms. It applies to those nations (not just in Africa) classified as least developed.

Many others benefit from Economic Partnership Agreements or other arrangements that give extensive tariff-free access to the EU market.

The EU also has free trade agreements which allow many other countries duty free access (though not necessarily for all goods). Among others that covers Canada, Chile and South Korea.

Japan has such an agreement with the EU though it has not yet come into force. The big gap on that list is the US. Negotiations were launched in 2013 though they have stalled.

Nor does the EU have free trade agreements with the two largest developing economies, China or India. In the case of India talks have made slow progress, partly due to British reluctance to agree the more liberal visa regime sought by New Delhi.

With China the EU is negotiating an investment agreement, but not a trade deal.

Disguised protection

There's more to trade barriers than tariffs, however. The other things that exporters have to contend with are known collectively as - surprisingly enough - non-tariff barriers (NTBs).

They include product standards, health and safety regulations, and labelling requirements. In many service industries there are licensing requirements and restrictions on who is eligible for authorisation.

Although suppliers may have to comply with such rules in their home market, if they want to sell into a country where the rules are different there is likely to be additional cost.

Global trade

More from the BBC's series taking an international perspective on trade:

There are often good reasons for such barriers - such as protecting consumers - but they do have an impact on trade and they can be a form of disguised protection for national suppliers.

One of the few analyses arguing that Brexit would be economically beneficial was based on the idea of the UK eliminating tariffs and also NTBs.

Is the EU especially guilty in this area? NTBs are hard to quantify and compare, though some economists have tried.

One analysis looked at measures to restrict trade that countries are required to report to the World Trade Organization. The EU came third behind the US and China for the number of measures notified.

Image copyright Getty Images Image caption When it comes to services, all barriers to trade are NTBs

Looking at service industries, all barriers to trade are NTBs. There are no tariffs on services. In this sector the EU's single market is less complete than it is for goods, so research by the Organisation for Economic Cooperation and Development (OECD) looked at individual EU countries.

The report covered 22 service industries in 44 nations (rich countries and some of the more advanced emerging economies) 23 of them EU members. Eight of the 10 least restrictive were EU members.

The EU also supports its farmers with subsidies. The system clearly helps them survive in the face of international competition. The OECD's estimate of total subsidies to farmers was close to $100bn in 2016.

But the EU is a very large economy and if you look at how much of farmers' incomes come from subsidies the EU doesn't stand out so much. It's more generous to farmers than the US but less than Japan, South Korea, Norway, Iceland or Switzerland.

Fairly liberal

The conclusion is that the EU does indeed protect some of its producers, especially farmers, from outside competition, although the EU's single market means they are fully exposed to competition from within the EU.

The EU can't claim to be the world's freest trader, but on many measures it's toward the more liberal end of the spectrum.

Britain may be able to go even further in that direction and remove barriers to trade unilaterally.

That will depend on what withdrawal agreement is reached with the EU and on a political judgement by the government about what changes to, for example, food standards it - and voters - are willing to accept.