The students were well aware of the odds against them: six applicants for every open slot in Montgomery County's two middle school magnet programs.

But with high hopes, hundreds of fifth-graders showed up at Takoma Park Intermediate School in Silver Spring yesterday and braved nearly three hours of tests that will help determine which of them will get in.

In Montgomery County and throughout the Washington region these days, vying for a prized slot in a magnet program is one of the biggest and most intense student competitions around. In many cases, it is fueled by anxious parents who view magnet programs as their children's best hope of future success.

Yesterday at Takoma Park, parents hugged their children and peppered them with questions after the test. In a show of pride, Ruth Miracle threw her arms around her 10-year-old daughter, Megan.

It was Megan's idea to take the test for Takoma Park, Miracle said. But Miracle seemed more excited than her daughter about the entire ordeal.

"She has always excelled in math, and she's not being challenged," Miracle said. "I feel like a program like this would push her and challenge her. She won't be complacent and just skate by."

Megan said she did her best, but she was trying hard to keep her enthusiasm in check.

"If I get in, I get in," she said. "If I don't, I don't. But I really want to get in because I want to have an opportunity to go to a magnet school. I want to excel in math and computer science."

A total of 680 students applied for the math, science and computer science magnet at Takoma Park, taking a math and science test yesterday, said Ginny Tucker, director of the school system's Division of Enriched and Innovative Instruction.

She said 524 sought admission to the humanities and communications magnet at Eastern, taking a test for writing, reading comprehension and analytical reasoning. To improve their odds, many students applied to both.

In the end, only 200 will be admitted, 100 into each school.

Paula Glaser is hoping her son Sam, a fifth-grader, will be among those admitted.

"Sam has thrived in an environment where children are engaged and involved in their education," she said. "I know from experience that this will continue in the magnet program."

Glaser said her older son, Harry, 14, attended Eastern and is doing well in high school. She said she views the popularity of magnet programs as an indicator of their quality, not necessarily of a lack of confidence among parents in neighborhood schools.

"It might be that some of it is a wish on the part of parents that their child is considered special or gifted," said Glaser, whose younger son attends a center for the highly gifted. "I think the programs have a reputation of excellence that has grown. Unfortunately, the number of programs available haven't grown to meet that need."

Both of the middle school magnet programs were implemented in the mid-1980s to increase enrollment at schools and to draw white children to schools in predominantly minority areas.

The county also has a high school math and science magnet program at Montgomery Blair and a series of other "signature programs" that offer a variety of educational themes.

For years, Montgomery County school officials considered race among the entrance criteria for magnet programs, but the courts struck down that practice. As school officials wait for word on whether the U.S. Supreme Court will consider their challenge to the lower-court decision, many parents say the absence of racial criteria helps to equalize the competition.

According to Tucker, applications for the magnet programs are up.

"I think parents are always interested in opportunities that provide challenges for their students," she said.

An admissions committee will consider a range of criteria, including performance on yesterday's tests, as well as grades and the students' interests. Acceptance letters are set to go out in mid-March.

Erica Irving, 10, tested for both programs but said she knows the competition is tough. Her attitude was common among the students.

"I'd like to get into Eastern," she said. "But if I don't get into either, I won't be heartbroken."