When Borough Hall flew the Egyptian flag from its roof last week in a nod to the movement towards democracy in that country and elsewhere across the Arab world, it became the first U.S. government building to do so.

At least according to Borough President Marty Markowitz, who celebrated the occasion with Brooklyn’s top Arab-American leaders.

Husam Rimawi helped organize the event. The president of the Islamic Society of Bay Ridge, Rimawi has become a pillar in his community since immigrating to Brooklyn from the Jordanian capital of Amman in 1977.

Rimawi left Jordan to attend college in Egypt, where he studied medicine, then continued west to the United States to get his medical degree. He settled in Bay Ridge, which has a strong Arab-American presence.

“New York in particular is the first state” immigrants come to when they arrive in America, said Rimawi, a gynecologist at Lutheran Medical Center. Many Arab- Americans end up in Brooklyn, he added.

“People bring their cousins, their friends, they see they are happy here and so they come” too, said Rimawi, who still lives in Bay Ridge with his wife and six of their seven children. (One child lives in Ohio.)

The Islamic society, which runs on a mosque on 69th Street and 5th Avenue, was started in 1991. Rimawi is also the chairman of the board at the Al-Noor School on 21st Street in Sunset Park.

The society serves hundreds of Muslims each week, but “at the same time we try to strengthen the relationship with the surrounding community,” Rimawi said.

That effort was aided by Markowitz’s decision to raise the Egyptian flag over Borough Hall in late February, following the ouster of Egypt’s longtime president Hosni Mubarek. It was the latest development in a reform movement that has swept across the Arab world, from Tunisia to Libya.

As Rimawi has watched developments unfold from Brooklyn, he said he is more convinced than ever that moving here was the right thing to do.

“I feel like it is a second country for me,” he said. Brooklyn “is like my home. We feel very happy here, very safe.”