KAWASAKI, Japan — There was a putrid smell emanating from the apartment. There was an obvious brown stain on the futon where the body had been. The futon, the clothes, the newspapers and horse-racing stubs were covered with maggots and flies.

Still, if the man had died in the summer and rotted for months in the sweltering heat, instead of drying to a shrivel as winter approached, it could have been much worse.

"I'd say this is a four out of 10," said Akira Fujita, leader of the crew from Next, a company that specializes in cleaning up after "lonely deaths" — where people lie dead in their apartments for long periods before being discovered.

Every country has cases where elderly people die alone, but none experiences it quite like Japan, home to the world's fastest-aging population. More than a quarter of the population is over 65, a figure set to rise to 40 percent by 2050.

Lonely death statistics are hard to come by — the central government doesn't collect them — but regional figures show a sharp increase over the past decade. NLI Research Institute, a Tokyo think tank, estimates that about 30,000 people nationwide die this way each year.

As the number of lonely deaths has grown, so too has the lonely-death-cleanup industry. Numerous firms offer this kind of service, and insurance companies have started selling policies to protect landlords if their tenants die inside their properties. The plans cover the cost of cleaning the apartment and compensate for loss of rent. Some will even pay for a purifying ritual in the apartment once the work is done.

The owner of this apartment in Kawasaki, south of Tokyo, didn't appear to have any such insurance, so was paying Next $2,250 to make the tiny studio apartment rentable again.

The tenant, a 54-year-old man named Hiroaki, had fallen several months behind on his rent, so a representative from the real estate management company went by to see what was happening. (The Post agreed to withhold the deceased man's surname, at the request of the cleaning company, to respect his privacy.)

When the representative opened the door, he found Hiroaki lying dead on the futon. He had probably been there for about four months. His body, the futon and floor around it were completely dry.

Although there were flies and maggots everywhere, the smell hadn't been bad enough to bother neighbors or the convenience store directly below.

After the body was removed, the management company called Next. The four-man cleaning crew led by Fujita arrived with an empty truck and full-body protective wear.

The first thing they removed was the futon, which was covered with brown residue and maggots and was the main source of the smell. It was vacuum-packed into a plastic bag and carted off to the truck. The men approached their work in a no-nonsense way, not wrinkling up their noses or commenting on the squalor — just getting on with the job.

The 200-square-foot apartment was overflowing with the detritus of a lonely life: instant-noodle bowls and soft-drink bottles, empty cans of coffee, cigarette butts in ashtrays, dozens of lighters, months' worth of newspapers, clothes in disheveled piles.

The men filled garbage bag after garbage bag. Utility bills and other papers were stuck to the floor with dried bodily fluids, so one of the men had to use a dustpan to chip them off.

The tiny bathroom was covered with black mold — the walls, the basin, inside the toilet, everything. Unidentified grime covered the doors and the kitchen sink, and all required industrial-strength cleaning liquid.

After removing all of Hiroaki's belongings, the crew got to work stripping the wallpaper and figuring out how much of the flooring they would have to pull up.

The paperwork showed Hiroaki was 54 and divorced. He had worked as a systems engineer for 20 years, including spells at big companies such as Nissan and Fujitsu.

But he was always in contract positions, meaning that he had no benefits and needed welfare to supplement his low income. Passport photos he'd had taken to apply for jobs show an entirely ordinary-looking man: gray hair parted in the middle, wire-frame glasses, checked shirt.

There were photo albums, but none seemed to contain pictures of Hiroaki.

The cleaning company did not know how or why Hiroaki died at this relatively young age, but his apartment was full of prescription medicines.

Fujita and his team had carted away all his belongings, ripped off the wallpaper, checked under flooring and scrubbed and disinfected the apartment from top to bottom. They left a deodorizing machine to run inside the apartment for a few days. Then they were done.

It was almost as if Hiroaki had never existed.