It was mind over matter for the 40 high school students who jumped into the swimming pool on Saturday at Martin Luther King Jr. Swim Center in Silver Spring.

Most of them were participating in their first endurance swim. Some just learned to swim so they could take part in the Navy SEALS Fitness Challenge, presented by the Montgomery County Recreation Sports Academy.

Joe Jones, a U.S. Navy SEAL stationed in Little Creek, Va., said the challenge was one of the basic tests for becoming a SEAL.

“We give [them] lessons on mental toughness, and we give physical toughness. The physical challenge is an application of the mental toughness,” he said.

The 500-meter swim was the first of the challenges faced by the students, all male except for Mercy Nuhu, 18, a junior at Albert Einstein High School in Kensington. In total, there were five challenges the students would complete that morning. Other challenges included two minutes each for push-ups, sit-ups and pull-ups, followed by a 1.5-mile run.

In the week leading up to the event, Jeremiah Monrose, 15, a freshman at Montgomery Blair High School in Silver Spring, said he was getting nervous.

He was one of the students who learned to swim though the program, which started in February.

He was worried he might drown, he said. But he kept in mind the words of one of his swim instructors.

“He told me: It’s about self-determination, just don’t quit,” Monrose said of his instructor, a SEAL who declined through a public relations agency to be interviewed for this article.

At the end of the challenges, Jeremiah said he was proud to have completed the course. He said that the swimming was the hardest part for him; the running and push-ups, the easiest.

“I feel pretty good. My teammates cheered me on and helped me complete the challenge, and I cheered for them,” he said.

Students from the Blair program took the top three places for individual achievement at the event. Senior Nebiyu Fitta came in first; junior Elias Yishak, second; and freshman Kalabe Arefeayne, third. The team won the trophy for top-performing school.

Nuhu said she learned a great lesson preparing for and completing the challenge.

“It lets me know I can set goals and accomplish them,” she said. “Being the only woman makes me feel tough.”

The program, which ran for 10 weeks, was part of the county Department of Recreation’s effort to reach out to students in four county schools with large populations of youth thought to be at risk for joining gangs or facing violence, organizers said. Both are commonly associated with high dropout rates and failing grades; low family income can be a factor.

The schools selected for the program in addition to Montgomery Blair and Albert Einstein were Springbrook High School in Silver Spring and Wheaton High School. All four have higher-than-average dropout rates.

Blair’s dropout rate is nearly double the countywide average, at 12.6 percent, according to Montgomery County public schools statistics. At Wheaton High School, nearly 82 percent of the student body is enrolled in the county’s free and reduced-price meals program, reserved for students from low-income households.

The program was an optional component of the Sports Academy programs offered by the Montgomery County Recreation Department at the four schools. The program is paid for by the Department of Recreation as part of the academy program and was free for the students.

“[The Sports Academy] provides adult supervision for students — we try to give them a place to go,” said Jose Segura, a recreation specialist with the county’s Department of Recreation who runs and helped start the Sports Academy program at Blair in 2006 after serving as a security assistant at the school between 2003 and 2006.

Few of the students participating in the competition have shown direct interest in becoming Navy SEALs — a highly lauded position within the Naval Special Warfare division — but most have taken their message of resiliency and mental toughness to heart, Segura said.

“I think the best was to hear about a kid who didn’t want to become a SEAL, but he said he was considering joining [the] medical field now that he knows what he’s capable of,” Segura said.