Denmark is building a 43-mile fence along its border with Germany to keep out wild pigs that could pose a major risk to the country’s pork industry.

The move, which was authorized by Danish lawmakers in June, is an attempt to prevent the spread of African swine fever. 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.

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

GIANT PIG CAUGHT ON CAMERA RAVAGING DUMPSTER NEAR SCHOOL GOES VIRAL

Denmark is one of the world’s largest exporters of pork and the meat accounts for almost half of the country’s agricultural exports, according to the Danish Agriculture and Food Council. There are around 5,000 pig farms in the country producing approximately 28 million pigs annually, officials say, and pork makes up more than 5 percent of Denmark’s total exports.

The Danish government has warned that the country’s pork exports to non-European Union countries — worth 11 billion krone ($1.68 billion) annually — could be affected by the disease. In 2016, total Danish pork exports were worth about 30 billion krone ($4.59 billion).

Denmark’s move has generated plenty of buzz on social media, sparking sarcastic comparisons to President Donald Trump’s proposed border wall between the U.S. and Mexico.

BEWARE RADIOACTIVE WILD BOARS: HUNTERS IN SWEDEN CONCERNED ABOUT CHERNOBYL’S FRIGHTENING LEGACY

"Who will pay for the fence? Surely, a gov't shutdown is coming??" tweeted @LeviCanao.

“Build the pig wall. Make Denmark pigless again,” tweeted @DaireMurphy1.

“It’s not a wall, but a high fence, that Denmark is building along its land border with Germany. To keep the wild pigs out,” tweeted Carl Bildt, co-chair of the European Council on Foreign Relations. “In ancient times there was a long wall here to keep everything out.”

TENNESSEE SCIENTISTS UNEARTH FOSSILS OF PREHISTORIC PIG-LIKE CREATURES IN STUNNING DISCOVERY

Critics say the fence, which will cost 30 million krone ($4.6 million), 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. Last year, concerns about the disease prompted the German government to allow hunters to shoot wild boar year-round, according to Reuters.

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."

RADIOACTIVE BOARS RAMPAGING THROUGH GERMANY

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

Elsewhere in Europe wild boar have also sparked concern about the long-term effects of the 1986 Chernobyl disaster. In 2017, for example, a wild boar with more than 10-times the safe limit of radiation was killed by hunters hundreds of miles away in Sweden.

After the explosion at the nuclear power plant in Ukraine, a cloud of radioactive particles reached parts of Europe, leaving a frightening environmental legacy.

CLICK HERE TO GET THE FOX NEWS APP

Wild boar populations in other parts of Europe, such as Germany, have also been contaminated with radioactivity in the aftermath of Chernobyl.

The Associated Press contributed to this article. Follow James Rogers on Twitter @jamesjrogers