Maryland’s Kevin Martir, front right, and Jose Cuas dream of playing on the same professional team. (Katherine Frey/The Washington Post)

Kevin Martir was an integral part of the most successful season in Maryland baseball history last spring, but there was a point in the middle of the year when he endured a terrible slump. He was struggling in his duties as a catcher, and his hitting had fallen off quickly. Martir was benched and became a self-described “mess.” He broke down in tears one day, and his only option was to turn to third baseman Jose Cuas, the Terrapins teammate he first met on a Brooklyn baseball field at age 6.

Martir said he won’t forget crying on his best friend’s shoulder, nor what came after. With Cuas by his side, he relentlessly worked to fine-tune his hitting and fielding until his confidence returned. He eventually returned to the lineup, helping Maryland make a memorable run to its first NCAA tournament super regional.

“I’m always thankful for Jose,” Martir said.

Leaning on each other continues to pay off this season, with the juniors forming the heart of Maryland’s order. Martir and Cuas bat third and fourth in the lineup and are among two of the best defensive players for the Terrapins (32-13), who are ranked 21st nationally by Baseball America and are eyeing their first berth in the College Baseball World Series in Omaha later this spring. Martir leads the team with a .374 batting average and 13 doubles and is second with 34 RBI. Cuas is first on the club with 40 RBI and second with 39 runs scored and seven home runs , including one in a 5-3 win over visiting Delaware on Tuesday.

“They’ve been through a lot of ups and downs together, on and off the field. I think their relationship has strengthened over the last few years,” Maryland Coach John Szefc said.

Kevin Martir leads the No. 21 Terrapins with a .375 batting average and 13 doubles and is second with 34 RBI. (Katherine Frey/The Washington Post)

Before Martir and Cuas became two of Maryland’s most productive players, they were rivals growing up in Brooklyn, always pitching and hitting against each other in the same youth league. “We would always go back and forth. It was ridiculous. It was just home run after home run after home run,” Martir said.

Their bond began to strengthen on a travel baseball club team called the Spring Creek Travel Program. Both of their families emigrated to New York from the Dominican Republic to find better economic opportunities — Martir was born in New York, while Cuas was born in the Dominican Republic and left when he was 2 months old, he said. They often would sell cookies and cake on street corners to fund trips, said the program’s founder, Regina Lashley, including for a trip to Florida when they were about 10 years old. It was the first time both Martir and Cuas had been on a plane and away from home, let alone in a different state to play baseball.

“They wanted to learn. They had that heart. They had that swagger. They were motivated to play ball,” Lashley said.

They had always thought about playing college baseball together, but the idea didn’t begin to stick until they attended the same high school, helping lead the team to its first city title in 2012. They were both spotted by Maryland’s staff at a summer tournament in New Jersey during their junior year. Martir committed first late that July, then called Cuas and begged him to join, telling him that they needed to stay together and help jump-start Maryland’s program, which at that point hadn’t appeared in the NCAA tournament since 1971.

“He was saying, ‘Hey, let’s stay together. Let’s take our dynasty somewhere and help Maryland, which has never been to a regional, who’s never been to Omaha,” Cuas said. “And I’m like ‘Hey, you’re right. Let’s do it.’ ”

Martir and Cuas arrived at Maryland to a new staff led by Szefc, who tabbed both as immediate starters. There was an initial culture shock. Both had grown up in the commotion of the city and were unprepared for the slower lifestyle of College Park. They moved into the same dorm room. Cuas didn’t know how to cook, so Martir would usually prepare food for both of them. They taught each other how to use the dishwasher and washing machines. Both had sisters who attended college before them, so both knew adjusting to the academic rigors was going to take time.

“Coming from Brooklyn into College Park, both of them have kind of learned the academic ropes, as far as how to utilize our resources and pursue their degrees,” Szefc said.

Third baseman Jose Cuas is first on Maryland with 40 RBI and second with 39 runs scored and seven home runs. (Katherine Frey/The Washington Post)

They have been described as inseparable by members of Maryland’s program, and even though they now live a few doors from each other, both spend most waking hours in each other’s company. The bond has extended to the field, where one is always aware of the other’s position. Martir will sometimes watch Cuas’s positioning at third base and hold up his arm in one direction, telling him to move over to the right or left.

Cuas and Martir arrived in College Park as “plus-defenders,” Szefc said, meaning their defense was ahead of their offensive abilities. But both have improved markedly at the plate since their freshman seasons. Cuas, who has played second base, shortstop and third base at Maryland, led the team with five home runs and 18 extra-base hits last year and improved his batting average from .182 to .279 (he’s batting .260 this season). Martir hit a steady .269 with four home runs last year and fueled the team’s late season run with a 13-game hitting streak.

That streak wouldn’t have happened without the help of his lifelong friend after the slump. Both Cuas and Martir are likely to be drafted later this spring, Szefc said, although the draft positioning and situation will determine whether they leave school early. Cuas said both plan to go pro later this year if all goes well, adding that they have long thought about playing on the same team together at the next level.

“It’s something we’ve dreamed of, playing on the same team, for a while,” Cuas said. “It’s asking for a lot. It’s something that you see as impossible, but it’s not impossible, because nobody would picture us in college right now, together.”