By Grant McCool

U.S. District Court Judge Lawrence McKenna said in U.S. District Court in Manhattan that "the government has not shown that there are no conditions to prevent Madoff from being a danger" to any person or cause economic harm.

McKenna agreed with a ruling Monday by U.S. Magistrate Judge Ronald Ellis. The government appealed the ruling in briefs and during a one-hour hearing on Wednesday.

Madoff, 70, who authorities say has confessed to running a $50 billion scam that defrauded investors worldwide, is out on $10 million bail and living under guard in his $7 million Manhattan penthouse apartment.

His assets are frozen under court order, but the government argued that he mailed $1 million worth of jewelry and valuables to family and friends in violation of the order. Madoff's lawyers argued that it was an innocent mistake and not an attempt to send his assets to other people.

"The freeze on the assets has made it close to impossible for the defendant to dispose of his assets,' McKenna said.

He said the restrictions on Madoff made it "close to nil as you can get" for Madoff to flee.

Madoff arrived at the courthouse at about 1:15 p.m., getting out of his car and walking with federal marshals into the building without taking any questions from the throng of reporters awaiting him.

The once-respected money manager, now one of the most vilified figures in the United States, was seen by reporters taking off a sleeveless dark blue flak jacket from under his coat after passing through the security metal detector in the lobby. He then was escorted by marshals to the courthouse elevators.

The bail conditions, including 24-hour house arrest and electronic monitoring, were imposed to "prevent harm or flight" according to a prior court order.

(Reporting by Grant McCool; editing by Jeffrey Benkoe)