The dingo fence in Australia. This is the longest fence in the world, at a length of 5,614 km

“The Dingo Fence or Dog Fence is a pest-exclusion fence that was built in Australia during the 1880s and finished in 1885, to keep dingoes out of the relatively fertile south-east part of the continent (where they had largely been exterminated) and protect the sheep flocks of southern Queensland”–yuckyucky