"He's not running yet, but I'll tell you, if he does run, I will endorse him," Diaz said. "He's an old friend, and I'm very loyal to old friends."
Diaz backed Clinton in her 2008 run for the Democratic nomination. But he praised O'Malley's work as Baltimore mayor to introduce CitiStat and the 311 system, and said he values executive experience in a candidate.
O'Malley has been acting like a presidential contender since he left the governor's mansion in January, hiring staff in early primary states, visiting Iowa, New Hampshire and South Carolina, giving policy speeches around the country.
Despite the uphill nature of a campaign against Clinton, O'Malley has garnered national attention as potential rival to the former secretary of state, who is the only declared Democratic candidate and commands an overwhelming lead in every public poll.
On Saturday, O'Malley is scheduled to speak at the South Carolina Democratic Convention alongside another potential Democratic primary candidate, former Virginia Sen. Jim Webb.