In court, Mr. Pistorius is seeking bail on the charge of premeditated murder, but he faces an uphill battle. Magistrate Nair ruled Tuesday that the case would be treated as the most serious kind of offense, which means bail will be granted only if the defense can prove extraordinary circumstances requiring it.

The court proceedings, though they concerned only whether Mr. Pistorius would receive bail, offered the first real glimpse into what unfolded at his home on the day of the shooting.

In his affidavit, Mr. Pistorius said that he and Ms. Steenkamp had decided to stay in for the night. He canceled plans with his friends for a night on the town in Johannesburg, while she opted against movies with one of her friends. They had a quiet evening, he said. She did yoga. He watched television. About 10 p.m., they went to sleep.

In the early morning hours, he said, he woke up to move a fan from the balcony and to close the sliding doors in the bedroom.

“I heard a noise in the bathroom and realized that someone was in the bathroom,” he said. “I felt a sense of terror rushing over me.”

He had already said in the affidavit that he feared South Africa’s rampant violent crime, and later added that he was worried because there were no bars on the window to the bathroom. Construction workers had left ladders in his garden, he said.