Morocco coach Walid Regragui said the country supports the Paris Saint-Germain defender.
"For us, and all Moroccans, we are behind Achraf," Regragui said at a news conference to announce his first squad since the team's historic run to the World Cup semifinals. "He has the presumption of innocence until it's proven to the contrary."
Hakimi was given preliminary charges of rape on March 3 by prosecutors in the suburb of Nanterre. A 24-year-old woman said she was raped by Hakimi at his home, though his lawyer said it is part of a racketeering attempt.
Hakimi has been allowed to leave France and played for PSG at Bayern Munich last week in the Champions League.
Morocco will host Brazil in Tangier on March 25 and then play Peru in Madrid three days later.
"I speak with Achraf often like I do lots of players," Regragui said when asked Monday about Hakimi. "He's calm, that's most important. He's someone who is strong on the pitch and beyond the pitch.
"We have to think of football first," the coach said. "He has people taking care of his business for him."
Morocco became the first African team to reach the World Cup semifinals last year. The team beat Belgium in the group stage and then Spain and Portugal in the knockout rounds. Morocco lost to France in the semifinals before being beaten by Croatia in the third-place game.
Hakimi's standout performances in Qatar earned him selection for the World XI team in a poll of players organized by global union FIFPRO.