MIDTOWN — After 35 years of selling oriental rugs out of a storefront showroom on East 28th Street, the Banilivy Rug Corp. is in its last month doing business there — joining a slow but steady exodus of rug merchants from an area that was once at the center of a bustling trade.

The blocks above Madison Square Park, known to real-estate types as NoMad, were for most of the 20th century and part of the first decade of the 21st as the center of the oriental rug trade in the United States. Ground floor showrooms lined the streets between Madison and Fifth Avenues in the low 30s, and larger import and export operations worked on higher floors.

In the 1970s, entire buildings were occupied by a slew of rug operations large and small, according to dealers who have worked in the area for decades. In 1972, 245 Fifth Ave. leased 10 of its 32 floors to rug dealers.

The area was unofficially known as the “rug district,” but those days are gone. Dealers blamed high rent, competition from cheap, low-quality online distributors and international trade relations, for the steady disappearance of rug vendors in the area.

Masood Banilivy, who has run his family business at 3 E. 28th St. since taking over from his father, has spent the last year trying to clear out his inventory in order to either move out of Manhattan or close up for good. For many years the company would sign a 10-year lease with the landlord, but in December of 2014, the landlord made it clear that it was no longer an option. The Banilivys had to go.

Now, his showroom still piled high with rugs and surrounded by signs advertising cut-rate sales, Banilivy is casting about for a new location away from the traditional rug district, almost certainly outside of Manhattan, where he can start again.

“Since three or four years ago, this area has gentrified,” he said. “Prices become ridiculously high.”

Banilevy is not alone. In the past five years, countless oriental rug operations have either gone under or moved to areas with cheaper rent, according to several dealers who spoke with DNAInfo.

High rental prices, developers with deep pockets and plans for new buildings have either priced rug merchants out or bought the buildings out from under them, making the once ubiquitous storefronts a much more rare sight, according to Mike Harounian, of Ebisons Harounian Imports, a rug company that is currently selling out of a temporary storefront in a building slated for demolition at 143 Madison Ave.

“You can count them on your fingers, the number of people left,” said Harounian, whose company — started by his father — has operated in the area for decades.

One dealer who recently fled his traditional stomping grounds for cheaper land is Iraj Noorullah, who moved his company, Iraj Fine Oriental Rugs, to Secaucus, New Jersey, when a developer unveiled plans to build a skyscraper at 15 E. 30th St., where he had run a showroom for 38 years.

Noorullah said he now pays about $10 per square feet at his New Jersey warehouse, compared to the $75 per square foot he said landlords in the area above Madison Square Park were asking for when he left in October 2014.

Leaving the enclave of rug dealers made financial sense, but it made doing business harder and more isolated, he said.

“It’s bad for the industry, because when we were together I could walk five minutes and trade for new rugs,” he said. “People would come here and find all of us, but when everyone is scattered, you have to think twice to come to Secaucus.”

Spotting the trend of a dying neighborhood is no new activity in New York, demonstrated in the case of the rug district with a 1983 New York Times article that profiled a group of rug merchants who set sail for New Jersey, fleeing high retail rent prices in Midtown South.

But according to Darius Nemati, whose father started the Nemati Collection family business in the area in 1963 and moved to Midtown East in the 1970s, the 1990s saw a boom in the rug trade and the arrival of a wave of smaller dealers who took up shop within the traditional borders of the rug district.

“The ‘90s were a second coming of the rug industry,” he said.

But the second coming did not last long. Rental prices in the area crept up, and in 2008 recession, along with most other sectors of the economy, the rug industry took a major hit. And before business could bounce back, another blow came when, in 2010, the U.S. imposed sanctions on Iran that banned the import and export of Persian rugs.

Rather than hurting the Iranian government, the sanctions wiped out a huge chunk of the trade between Europe and the Americas, Nemati said. In 2009, before the sanctions, the United States imported $41 million worth of rugs from Iran, according to the Oriental Rug Importers Association.

With the sanctions, that trade went up in smoke and many smaller dealers, including many who had taken advantage of lower rental prices in the rug district in the early 1990s, either closed up shop or headed for cheaper places to sell their goods, Nemati said.

“It just destroyed that end of the business,” Nemati said. “It was meant to be a sanction against the Iranian government, but it ended up putting a lot of small businesses out.”

But sanctions or no sanctions, Nemati echoed about the neighborhood what his fellow businessmen said: the rent is too high.

Merchants who used to be able to pay about $10 per square foot for office and warehouse space on the higher floors of buildings in the neighborhood saw the price go up as high as $40 per square foot when it was time to sign new leases, Nemati said, and he estimated that ground floor retail rental prices could be as much as four times more expensive.

Whereas once merchants could operate warehouse-sized retail, import and export operations in the formerly seedy blocks above the Flatiron, the real estate boom made it next to impossible to take up that kind of space in Manhattan.

“When my father started here, ground floor retail was pretty cheap,” Nemati said. “This was not a good neighborhood, with street walkers, welfare hotels and the like.”

But with property values through the roof in Manhattan, pressure fell on the small business owners of the rug district. And as long-term leases came up for renewal, people started to disappear.

Nemati, like the others, could not stay in the rug district, nor anywhere else in Manhattan. After liquidating a good amount of his inventory from his Upper East Side showroom in 2014, he closed his showroom, let his half-dozen employees go, and moved to Long Island City, where he now runs a private rug dealership.

For all the bad news, there are still more rug shops in the former rug district than you might find elsewhere in the city, and some people want to hold on.

Mike Harounian, who has several months left in his temporary space said he is looking at three locations for a new storefront in the area, and is reluctant to leave the neighborhood where he and his family have made a living for decades.

“This is where we have roots,” he said. “It’s hard to give that up.”