Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

COPENHAGEN, Denmark — Denmark has begun erecting a 43-mile fence along the German border to keep out wild boars in an attempt to prevent the spread of African swine fever, which could jeopardize the country's valuable pork industry.

Work on the fence, which will be up to 5 feet tall, began Monday in Padborg, 136 miles southwest of Copenhagen.

It was authorized by Danish lawmakers in June after the government warned that Denmark's pork exports to non-European Union countries — worth $1.6 billion annually — could be affected by African swine fever. In 2016, total Danish pork exports were worth about $4.55 billion.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Unlike swine flu, African swine fever doesn't affect humans but it can be deadly for domestic and wild boars, and cause massive losses for farmers.

Critics say the $4.6 million fence will harm wildlife and is a symbolic gesture tackling a largely non-existent problem. Danish officials have admitted that wild animals could, in theory, pass through the gaps in the fence where it crosses highways, roads and streams.

No cases of African swine fever have yet been reported in Germany, though they have been in some neighboring countries.

German news agency dpa reported Monday that Jan Philipp Albrecht, the agriculture minister of the neighboring German state of Schleswig-Holstein, as saying the disease is "a serious threat for animals and the pig market."

However, it said he added that "we have significant doubts about the usefulness and necessity of a fence between Denmark and Schleswig-Holstein."

According to the European statistical agency Eurostat, there are some 150 million pigs in the E.U., and 40 percent of them are in Spain and Germany, with significant numbers also in France, Denmark, the Netherlands and Poland.

Denmark is the only E.U. country where pigs outnumber people, with 215 pigs to every 100 residents.