With its long corridors and high-ceilinged rooms, “Sanatoriet,” a residence housing some five hundred asylum seekers in the three-thousand-resident southern Swedish town of Broby, looks a whole lot like a hospital. That’s because the hundred-year-old building used to be one. By 2012, however, it had stood unused for years. That’s when Jahangir Hejazi spotted a business opportunity and took it over.

“My intuition told me we’d get a wave of humans,” explains Hejazi, an Iranian who fled to Sweden as a teenager and went on to work for the Swedish Migration Agency. He was right. In 2012 Sweden received 43,887 asylum seekers; by 2014 the number had grown to 81,301, and last year 162,877 people applied for asylum.

As a former Migration Agency official, Hejazi also knew that the agency had no means of accommodating all the asylum seekers: it only has space for some thirty thousand people in the apartments that it owns and rents across Sweden. In the past, the Migration Agency housed all asylum seekers in its own residences—dorm-style accommodation scattered across the country. But in the 1990s, the government decided that the Migration Agency should rely on the private sector for refugee accommodation in case of a surge. In the past decade, the agency has occasionally rented accommodation from private companies. But the current influx of refugees has created housing needs of different proportions altogether.

Other countries, too, rely on private companies for refugee housing. In Austria, lodging for arriving asylum seekers is operated by the Swiss company ORS (which is, in turn, owned by a private equity firm). The company made headlines last year when news emerged of scandalous conditions at its camp in the Austrian town of Traiskirchen. Nearly four thousand asylum seekers were kept at the camp without enough room or even enough beds for everybody. Even pregnant women were reported to have to sleep outdoors on cardboard boxes. In Norway and Germany, too, private companies operate refugee housing for the government. In the eastern German town of Radebeul, for example, a former Stasi officer is now making a quick fortune housing asylum seekers.

And in Britain, all asylum seekers are housed by private companies, primarily in deprived cities. In an exposé last month, the Times of London reported that many asylum seekers are housed in ramshackle conditions by a multimillionaire operating under a contract with G4S, the security giant. Oddly, his company—named Jomast—also paints the doors of properties housing refugees red, making the residents an easy target for abuse by locals.

But nowhere is the refugee industry more prominent than in Sweden, which last year received more asylum seekers per capita than any other European country and where even venture capital firms now own refugee housing. “It’s a totally crazy situation, with gold diggers buying up conference centers far out in the countryside and stacking asylum seekers in corridor-style living with no access to activities, no access to infrastructure,” says Sven Otto Littorin, a former employment minister.

For the past several months, the Migration Agency’s staff in charge of finding housing have frantically been buying lodging for the migrants, and the market has responded in style: some three hundred companies, most of them founded in the past three or four years, now sell space in properties ranging from conference centers to camping sites, youth hostels and former hospitals. Some residences are smaller, with as few as fifteen beds, while others are as large as Jahangir Hejazi’s former hospital. A two-year-old company called Accumul8or Invest recently signed a deal with the Migration Agency to house over 1,200 asylum seekers on a ship.

As refugee numbers skyrocketed last year, the Migration Agency had to accept virtually every bidder—and pay the maximum fee allowed by law. It does inspect the residences, but as its contracts only oblige the operator to provide food and lodging, there is little the inspectors can do. They can’t force the providers to serve better food, buy larger beds or organize activities. Sometimes, however, inspectors report unsatisfactory conditions. The Migration Agency’s contracts demand sanitary conditions, regular cleaning of communal areas, and observance of fire safety regulations. “The owners almost always fix the problems,” says Björn Andrén, the Migration Agency official in charge of housing for asylum seekers. “They’re eager to keep getting their millions.”

With most operators making hefty profits, the issue is not that the Migration Agency pays them too little. The problem is not even that asylum seekers are suffering, although spending months in shared rooms with no diversion is clearly taxing. Instead, the moral conundrum is that asylum seekers have created a gold rush where taxpayers pay private companies enormous amounts to care for refugees—money that could be spent on the refugees already in Sweden or on those trying to reach Europe.

Conditions at Hejazi’s residence are comparatively good: refugees receive cooked meals each day and enjoy a recreational room set up for billiard and table tennis. Hejazi has also tried to organize work experience for his residents at the local supermarket, but it’s tricky since they lack work permits. “The contract between the provider and the Migration Agency just stipulates that the provider has to offer food and lodging,” he notes. “My company tries to do a bit more, but we don’t get paid for it. I wish the Migration Agency contract would include a provision about giving the asylum seekers something to do. Just letting them wait is a waste of resources.” The Migration Agency pays the operator 350 kronor ($41) for each asylum seeker per day. For unaccompanied minors—last year 35,369 unaccompanied underage asylum seekers arrived in Sweden, a European record—the Migration Agency pays even more: between 2,000 and 7,000 kronor ($235–820) per child per day.

At Hejazi’s former hospital, three to six people share a room, depending on its size. When the refugee wave hit Sweden last fall, the Migration Agency allowed some residences to house more people per room than had previously been allowed. But the striking aspect about privately run residences is not the lack of space, it’s the dreariness during the wait for asylum. At Sanatoriet, in every corridor, every communal space, even the improvised mosque, there are men hunched over their smartphones. Sometimes they walk to the supermarket. Allam Hajali, a civil servant and father of two from Aleppo, arrived here five months ago. Now he is waiting. Until he gets asylum and can bring his family, his life will consist of a bed and a bedside table in a room shared with three other men. “It’s mentally draining,” he says of the wait. “I surf the internet and talk to my family.” To make the time go faster, Hajali and many of the other residents fastidiously clean their rooms every day.

Hejazi has made good money on his refugee housing business. In 2014, he made a 36 percent profit, though he says it went down last year. (Hejazi did not respond to a question about the size of his salary.) But to his credit, Hejazi works in an office inside the residence and interacts with the refugees. By contrast, many other residences are owned not by local entrepreneurs. The venture capital firm IK is the majority owner of refugee industry giant Attendo, which operates residences for both adults and unaccompanied minors. Aleris, a company specializing in residences for unaccompanied minors, is owned by the Swedish investment giant Investor AB, which in addition to its subsidiaries has significant holdings in a range of multinational corporations including SAAB, Electrolux, AstraZeneca, ABB and Nasdaq. Investor is owned by the Wallenberg family, whose current patriarch and chairman, Jacob Wallenberg, also sits on the board of Coca-Cola. “We operate cost-efficiently, maximizing the cash flow for investments and distribution to shareholders,” writes Investor on its website.

Sweden’s largest refugee service company, Jokarjo, which is owned by pop music mogul Bert Karlsson, has achieved a profit margin of 25 percent. Last year Jokarjo billed the Migration Agency for 202 million kronor ($25 million), an astounding leap from its 2012 revenues of 8 million kronor. Given these figures, it’s perhaps not surprising that Morgan Stanley recently wanted to invest in the company. Lots of recently founded companies with names such as Nordic Humanitarian and Stimulans Invest, often owned by venture capital firms, now make millions of Swedish kronas housing asylum seekers. According to a recent investigation by the Swedish daily Aftonbladet, most of Sweden’s thirty largest asylum companies are making profits above 10 percent, with many showing profit margins above 50 percent.

Neither Attendo nor Aleris nor Jokarjo responded to requests for interviews and visits to their residences. But according to accounts by former residents, while some of the residences provide a cozy atmosphere as well as activities, others offer a bare minimum of comfort. Reporters for the Swedish newspaper Expressen have discovered mold in refugee housing belonging to Jim Hoppe, one of the major players in the industry. “It’s completely wrong that we taxpayers pay millions to Bert Karlsson,” argues Sasja Beslik, head of responsible investments at Nordea, one of Sweden’s largest banks. “The government should keep close tabs on who it’s doing business with.”