The Marion County boys basketball team couldn't hold onto a lead in the fourth quarter of a 54-51 loss at Madison on Thursday.

The Marion County boys basketball team almost pulled off a second miracle finish in three days when it played at Madison on Thursday night.

Two nights after beating Atlanta 51-50 with a last-second free throw and only two players still on the floor, the Mustangs made a furious late rally before falling to the host Panthers, 54-51.

Marion County head coach Justin Ellison said the Mustangs played well and maintained intensity after their emotional game at Atlanta.

“I am proud of the way we fought,” Ellison said of his team, which dressed out six players. “To come back like this after that crazy game the other night, that is just something.”

Madison junior Jimmy Layton paced the Panthers with solid inside shooting and free throws as the hosts nursed a slim 18-16 lead as the first quarter ended.

Both teams traded buckets in the second quarter, with Marion County pushing ahead and taking a 32-29 lead at halftime. Ty Bowdish and Carson Bock combined for 11 Mustang points in the second period.

“We did not know exactly what to expect,” said Madison head coach Jacob Youse. “They came out shooting extremely well and challenged us.”

Marion County came out hot in the third quarter and took a 38-29 lead, holding Madison scoreless until 1:33 left in the frame when Dakota Lafferty made a layup. A 3-pointer by Tyler Buck pumped some new life into the Panthers, who trailed 40-34 entering the fourth.

But Madison mounted a comeback in the fourth quarter, paced by a pair of 3-pointers by Buck and six more points from Layton. Madison played smothering defense, frustrating the visiting Mustangs.

Ellison said his team let the game slip away in the final period.

“I feel like we played for three quarters the best we have played on both offense and defense this season,” he said. “We just had three minutes where we gave the game away. We committed turnovers, and they scored some quick baskets.”

The wildest part of the game came in the last 1:18, after Madison went up 54-47. With only one team foul in the half, Ellison ordered his players to foul in an attempt to frustrate the flow of the game for Madison. It worked. The Mustangs committed five fouls in 20 seconds and scored a couple of baskets before putting Madison in the bonus.

Madison could not capitalize on its free-throw opportunities, missing several shots to keep Marion County in the game.

But the Mustangs comeback came up short.

“They gave us a lot of looks at the foul line and we struggled,” said Youse, “but we played defense. Tonight was a true team effort.”

Sheldon Whetstone led Marion County with 16 points, while Bowdish posted 15 and Bock had 13.

Madison’s Layton led all scoring with 18 points, while Lafferty finished with 13.