NEW YORK — Pat Riley got the telephone call Thursday and didn’t want to believe it. But Magic Johnson, who led the Lakers to five championships in the 1980s, always told it straight.

Johnson called his former coach Thursday to tell him he had contracted the HIV virus and would announce his retirement from basketball later in the day to champion the fight against AIDS.

Later Thursday, Riley, now the coach of the New York Knicks, led the crowd at Madison Square Garden in prayer.

Riley said Johnson’s emotional announcement on national television was an example of the courage that made him one of the NBA’s greatest players.

“His spirit is strong and he’s obviously the old Earvin,” Riley said after watching Johnson’s press conference on the television in the Knicks’ locker room. “He is alive but not very well right now. We do not want to eulogize him.

“We want to now give him all the love and support and prayers we can, as well as to all the other people who are afflicted by this insidious disease. He’s a man who I believe will champion the fight as he has done for professional basketball.”

Riley was clearly devastated by the news. Once during the five-minute news conference, he paused to compose himself. His eyes were red and wet.

“All the people who know and love him feel a lot worse than him because we know it’s a tough fight,” Riley said. “And if anybody … (pause) … has ever been any tougher than him … we’ll find out exactly what he’s about. He amazes me.”

Riley took the microphone before the Knicks’ game against the Orlando Magic and addressed the Garden crowd from center court. After asking for a moment of silence, Riley called over the players from both teams and led them in the Lord’s Prayer.

“We take this moment of silence to give our love and support to Earvin and his family and to the one million people who are afflicted with this insidious disease who need our understanding,” Riley said.

Contacted at his hotel room before coming to the Garden, Riley spoke hesitantly about Johnson and all he had meant to his coaching career.

“It’s just tragic,” Riley said. “It’s a bad day and a sad day for a lot of people.”

Riley admitted there was no way he could put Johnson’s ailment on the back shelf while he was coaching against the Magic Thursday night.

“You can’t,” he said. “This is about a human being. This has nothing to do with anything other than support for him. My wife, Chris, and my family have an unbelievable relationship with him. Our heart and soul will be with him.”

Riley said he had received a lengthy letter from Johnson on Wednesday. Johnson did not give any hint of his medical condition but simply congratulated Riley on his new job and rehashed old Laker memories.

“It was sort of ironic,” Riley said. “He wished me well tonight. He said, ‘Good luck.”‘