The history of the mosque in Kuala Kubu Bharu began with a huge flood in Kuala Kubu town in 1883. The effect of the flood caused Kuala Kubu residents to move out to a new place that was named Kuala Kubu Bharu. A new mosque was built for the people to pray in Kuala Kubu Bharu area. The mosque was first built in 1965 and it was as a result from the local residents contributions and the state government. It was built on top of a land owned by a British officer who managed the rubber estate and tin ore mining business. Until 1998, the increasing population density in Kuala Kubu Bharu urged Selangor Islamic Religious Department (JAIS) to take down the aging mosque and rebuilt a bigger, more modern mosque that was named Masjid Ar-Rahimah. The new mosque started its construction process in 1998 and finished in 1999 with the support from the state government and JAIS. Masjid Ar- Rahimah was finally officiated by the Sultan of Selangor, His Royal Highness Sultan Sharafuddin Idris Shah Ibni Almarhum Sultan Salahuddin Abdul Aziz Shah on the 1st of November 2002.
The mosque’s architecture is styled with classical English style, equipped with a tall, beautiful minaret on the outside of the mosque. The mosque has one large dome on the centre and flanked with four smaller domes from each side of the mosque. The mosque is built from concrete and tiled roof. The base colour of light blue and white on the walls of the mosque gives a sense of calmness to visitors of the mosque. The mosque has one prayer hall equipped with carpets for comfort to the worshippers. The old part of the town which was affected by the flood was renamed to Ampang Pechah in remembrance to the tragedy that was caused by a dam in Kuala Kubu.