The Wizards had hoped to add all-star forward Al Horford during free agency. (Curtis Compton/Associated Press)

The Washington Wizards came into this summer hoping to land a star.

Their last chance to do so via the free agent market went away Saturday night.

Despite making it into the final three teams chasing four-time all-star Al Horford, the Wizards missed out on the versatile big man when he agreed to sign a four-year, $113 million max contract with the Boston Celtics.

Washington quickly rebounded by coming to an agreement with free agent big man Ian Mahinmi, 29, with league sources confirming he signed for four years and $64 million guaranteed. There were no options in the deal.

The Wizards, Celtics and Horford’s former team, the Atlanta Hawks, all felt they had a chance at securing Horford’s services as Saturday wore on. Horford had met with five teams during the day Friday and eventually cut the Houston Rockets and Detroit Pistons off his list.

As the day progressed, it seemed likely Horford was going to leave Atlanta, given the Hawks never offered him the full five-year max he had asked for to stay with the team that drafted him third overall in 2007. And in the end, Horford chose to sign with the Celtics, tweeting “Celtics Pride!!!!!!” to signify his choice to leave Atlanta and head north to Boston.

Entering the offseason, Horford was one of three available free agents — along with Kevin Durant and Nicolas Batum — Washington was comfortable with offering a max contract this summer. But after Durant declined to grant his hometown team a meeting and Batum talked to a few teams — including the Wizards — before re-signing with the Charlotte Hornets early Friday morning, it appeared Washington would go 0 for 3.

Things began to break Washington’s way starting Friday afternoon, giving the Wizards an opening to secure Horford’s services. First was Atlanta’s reluctance to offer Horford a five-year max contract, which led to Horford beginning to test the market.

With Durant’s meetings dragging through the weekend, teams that might have been players for Horford — specifically the Golden State Warriors — put their plans on hold waiting to see what Durant decides to do. Teams like the Rockets and Los Angeles Lakers — often major free agent destinations in the past — appear to have lost some of their luster this time around.

Then, early Friday evening, the Hawks struck a three-year, $70.5 million deal with center Dwight Howard. Suddenly, Atlanta had a player to replace Horford at center — and if the Hawks wanted to re-sign him and play him at power forward, where he is also a viable option, they already had an all-star at that position in Paul Millsap.

But after spending 24 hours thinking they had a shot at landing Horford — a move that would have validated the team’s decision to spend the past year preparing a max contract slot to chase Durant or another prominent free agent — the Wizards were left disappointed again. Adding him to their current core would have used up most of Washington’s projected $31 million in cap space, but it also would have vaulted the Wizards squarely into the conversation for the second-best team in the Eastern Conference behind LeBron James’s Cavaliers.

Instead, Horford chose a different direction, and the Wizards were forced to change course. That led them to Mahinmi, the former Indiana Pacers center who averaged 9.3 points and 7.1 rebounds in 71 games — all starts — last season.

Mahinmi shot 59 percent from the field last season, and he is good both in the pick-and-roll and as a mobile defender and rim protector. He could either play next to incumbent center Marcin Gortat or come off the bench behind Gortat and Markieff Morris.

With his deal likely to start at just under $15 million, the Wizards should have about $16 million in available salary cap space to fill out their roster. Including Mahinmi and restricted free agent Bradley Beal, the Wizards now have seven players under contract. They still need a backup point guard, at least another wing player or two and another big man.

But the quickest and easiest way for the Wizards to take a step forward this summer was to land a big fish like Horford. For several hours Saturday, it looked like they had a real chance to do so.

Then came a tweet and the instant realization there was still far more work left to do.