the ex-NBA star finally coughed up the $40,000 he owed his ex wife ... narrowly escaping time in the slammer.

TMZ broke the story ... Iverson's ex, Tawanna, has been trying to collect child support from the b-baller since their divorce was finalized in February, but no cigar. Then, last month she asked a judge to throw him in jail, if he continued to dodge the bill: $8,000 / month for the last 5 months.

In new court docs -- filed last month in Fulton County, GA -- Iverson said he never paid the money because he was led to believe he and Tawanna would reconcile.

Iverson admitted that he told Tawanna that he had no intention of paying her child support despite the fact that he had just received $462,460.24 and thus had the ability to pay.

With those words from his mouth, Judge Lane held him in Contempt of Court and ordered him to pay a total $71,000.00 within 72 hours otherwise she directed the Fulton County Sheriff’s Office to place him under arrest and keep him in jail until the payment is made.

Judge Lane also stated in her written order the following:

The father, rather unapologetically, testified that he had consumed alcohol “maybe twenty” times recently, including during his parenting time; that he had not taken any therapy sessions; that he had not taken any therapy sessions; that he had not attended any AA meetings; and that he did not intend to attend any.

When A.I. is 55 years old, money that Reebok put in a trust for him (as much as $30 million & Tawanna gets half) will become available. Iverson’s family and friends are worried, that if he isn’t careful, he won’t make it to 55 to get that money.

This is a very disturbing overview of Allen Iverson’s present day life done by Kent Babb of The Washington Post. It starts with Iverson himself, yelling at his now former wife Tawanna, during a divorce proceeding.

Iverson stood during a divorce proceeding in Atlanta in 2012 and pulled out his pants pockets. “I don’t even have money for a cheeseburger,” he shouted toward his estranged wife, Tawanna, who then handed him $61.

The rest speaks on a downward spiral that you wonder if Iverson can pull himself out of.

For the past three years, as Iverson chased an NBA comeback, his marriage fell apart and much of his fortune — he earned more than $150 million in salary alone during his career — dissolved. Now, those who once ignored past signals have recognized that basketball may have been the only thing holding Iverson’s life together.

Iverson hadn’t been present for Tiaura’s birth in 1994, and three years later, when Allen Jr. was born — they would call him Deuce — Iverson was “very intoxicated” and unable to drive her to the hospital, Tawanna told the court.

Iverson kept living as if another contract was imminent, and Tawanna struggled to curb his spending. According to a bank statement submitted in the divorce, the couple’s checking account was overdrawn by more than $23,000 in July 2011. In a single day, $23,255.36 was deducted — at a diamond store, a hat shop, a steakhouse and a hotel.

Before their home in Denver was foreclosed, Tawanna testified, she sold more jewelry at a pawn shop to pay toward debt. Iverson owed thousands to a Georgia home builder, was hit with tax liens, and his wages were garnished to settle a nearly $860,000 balance with a jeweler.

Larry Brown, Aaron McKie, Pat Croce, John Thompson and others have reached out to Iverson, but rarely get a reply. He has been described as a recluse and there seems to be genuine concern about his well-being.

I don't blame his wife, she has kids to support and she did give him the money from her pocket when he yelled at her in court (even though it wasn't much). Yelling at me in court I would have said some choice words instead haha.

I've grown up around too many people like this that destroy their own lives and then blame/ask for hand outs from everyone else to find sympathy for him.

No one told him to kick it with whoever he did, no one forced him to spend a lot on alcohol and everything else he wasted all that money on.