A homeless hawk can return to his posh digs, but his biggest fan won’t be able to get anywhere near him, after a judge ordered accused harasser Lincoln Karim to stay away from CNN anchor Paula Zahn and her kids.

As workers took measurements for a guardrail around Pale Male’s former perch at 927 Fifth Ave. yesterday, Karim, 43, was being arraigned in a Manhattan courtroom, in front of a small band of fellow bird lovers.

He was released without bail and left the courtroom without a word. After prosecutors read aloud his police confession, a judge ordered Karim to stay at least 1,000 feet away from the Zahns.

“I’m sorry, I knew I should not have gone after the kids,” he wrote. “It was a way of getting my point across because of who she is. Yes, I was screaming at her, but I was far away.”

Karim, an obsessive Pale Male fan for years, was hauled off in handcuffs from a vigil in front of the building Tuesday, after Zahn complained he stalked and harassed the family. Zahn’s husband, building co-op board chairman Richard Cohen, evicted the famed bird from his decade-old roost last week.

Karim regretted yelling at Zahn’s youngest son, 7, last Thursday, and sent the children an apology the day before his arrest, said Frederic Lilien, a protester who made a film about Pale Male.

Karim is an audio engineer for The Associated Press who, until recently, had worked at CNN.