The day he received a scholarship offer from Maryland, early in his sophomore year at Mount Saint Joseph, Jalen Smith shared the good news on Twitter.

“Honored to say the University of Maryland has offered me today,” he wrote in an Oct. 3, 2015, post that included a photo of the Xfinity Center floor. Smith also added a hashtag to the tweet: “#NoPlaceLikeHome.”

Smith had grown up a Terps basketball fan. He said then that it was a “dream” to get offered. But he did not commit, and for almost the next two years, his recruitment blew up and dragged on, a series of visits to College Park prompting the same question: Just when would of the nation’s top forward prospects make his dream come true?

On Monday night, he decided he could wait no longer. After an official visit to Maryland this weekend, Smith made an announcement on Twitter. The first line dripped with self-aware irony: “I’ve finally committed.”

“I believe that I can academically and athletically achieve my goals at home through my commitment to the UNIVERSITY OF MARYLAND,” the reigning Baltimore Sun All-Metro Co-Player of the Year wrote in a longer message.

The 6-foot-10, 195-pound Smith averaged 17 points, nine rebounds and three blocked shots per game as a junior, teaming with incoming Terps freshman and close friend Darryl Morsell to lead the Gaels to the Maryland Interscholastic Athletic Association A Conference and Baltimore Catholic League titles last season.

Rated the No. 29 overall prospect in the Composite rankings, Smith is the second four-star recruit in the Terps’ Class of 2018, joining small forward Aaron Wiggins.

Smith also considered offers from Virginia and Villanova before choosing the school that gave him his first.

“I think that he put himself in a position to attend a school like Maryland because of the young man he is, the type of student he is, the type of player he is and the type of player he is capable of becoming,” Mount Saint Joseph coach Pat Clatchey said. “I still think his best basketball awaits him. I’m very excited for him and his family. It’s a great opportunity to attend your state school. He’s a terrific student, and his parents will have a chance to watch him play all his home games.

“I know he had a great visit, I communicated with his mom [Monday] and I got the sense that he was close to making a decision. I didn’t know it would be this soon, but they’re perceptive, smart people and they feel like this is a great opportunity.”

With Duke transfer Sean Obi and rising senior Michal Cekovsky set to graduate after next season, and rising sophomore Justin Jackson a projected first-round pick in the 2018 NBA draft, Maryland had a pressing need for frontcourt help.

Incoming big-man recruit Bruno Fernando is part of the solution. Now Smith is, too, with more large reinforcements possibly en route. The Terps are among the favorites to land center Moses Brown and forward Silvio De Sousa, both top-30 recruits, the ingredients for a potentially program-altering class. Five-star guard Keldon Johnson and four-star guard Devon Dotson are also in the mix, along with John Carroll rising senior Immanuel Quickley, though Kentucky remains the favorite for the blue-chip point guard.

Even after an early-summer stretch during which Smith’s recruiting rankings have fallen some, Clatchey said the player who has started for him since his freshman year has a “wide open” ceiling.

Already a gifted rebounder and defended, “Sticks,” as he’s known, has continued to grow. His ball-handling and passing have improved of late, Clatchey said, and with his perimeter skills, Smith could be an ideal fit in Maryland coach Mark Turgeon’s pick-and-roll-heavy offense.

“He’s still young, a young 17-year-old still growing into his body,” Clatchey said. “I just think that he has a chance to impact the game in so many ways at both ends. I think it’s great for him and his family, it’s great for Mount Saint Joe and our program to have back-to-back years of young men who have continued their educations and basketball careers at the University of Maryland.”

Baltimore Sun reporter Glenn Graham contributed to this article.