VIDEO: Suspects shown on surveillance cameras
Officials say they need the public's help in identifying the two men. If you recognize them, call 1-800-CALL-FBI.
The FBI website crashed shortly after posting the photos.
FBI Agent Richard DesLauriers says the photos came from surveillance cameras near the explosion sites.
The explosions Monday killed three people and injured more than 180.
The images were released hours after President Barack Obama and first lady Michelle Obama attended an interfaith service at a Roman Catholic cathedral in Boston to remember the victims, 29-year-old Krystle Campbell, 8-year-old Martin Richard, and 23-year-old Lu Lingzi.
The photos depict one man in a dark baseball cap and the other in a white cap worn backward. The men were seen walking together in the crowd, and the one in the white hat was seen setting down a backpack at the site of one of the second explosion, said DesLauriers.
"Somebody out there knows these individuals as friends, neighbors, co-workers or family members of the suspects. Though it may be difficult, the nation is counting on those with information to come forward and provide it to us," DesLauriers said.
The two men - dubbed Suspect 1 (in the dark hat) and Suspect 2 (in the white hat) - are considered armed and extremely dangerous, DesLauriers said, and people who see them should not approach them.
"Do not take any action on your own," he warned.
The break in the investigation came just days after the attack that tore off limbs, shattered windows and raised the specter of another terrorist attack on U.S. soil. FBI photo-analysis specialists have been analyzing a mountain of surveillance footage and amateur pictures and video for clues to who carried the attack and why.
Generally, law enforcement agencies release photos of suspects only as a last resort, when they need the public's help in identifying or capturing someone.
Releasing photos can be a mixed bag: It can tip off a suspect and deny police the element of surprise. It can also trigger an avalanche of tips, forcing police to waste valuable time chasing them down.
The Associated Press contributed to this report.