Investigators apprehended the man at the Blaschkoallee U-Bahn station.
The arrest follows a wave of arson attacks on Muslim houses of worship in Berlin in recent months. No one was injured, but the fires caused property damage in every case.
The assailant or assailants routinely left messages behind at the scene. Police did not describe the notes in detail, but media reports said the messages were collages of newspaper articles.
Following a comprehensive investigation, state prosecutors reportedly obtained a warrant to search the offices of the Berlin daily newspaper B.Z. A police spokesman said investigators confiscated evidence that strengthened the case against the suspect.
According to the newspaper's editor-in-chief, Peter Huth, the suspect contacted B.Z. in mid-December under false pretenses, requesting a copy of a newspaper article. Huth said an employee received the inquiry.
"Wisely, she took down the name and the address and was able to inform police officers on Friday afternoon, which allowed for an arrest within a few hours," B.Z.'s editor said.
A police spokesman said the man arrested Friday is suspected of involvement in four of seven arson attacks on Berlin mosques since June of last year. Investigators are examining whether the suspect has any connection to the other incidents.
Most recently, the entrance of a mosque of the Ahmadiyya community in the Wilmersdorf district of Berlin was set ablaze in the early hours of January 8. Mosques in the districts of Neukölln and Tempelhof were targeted in similar attacks in 2010.