The protesters called for an end to the detention and deportation of migrants and for the United States to welcome the caravan of Central American migrants who arrived in Tijuana, Mexico in November.
Facebook posts by protest organizer the American Friends Service Committee (AFSC) showed demonstrators kneeling in front of federal agents in riot gear after they approached the fence on a San Diego beach.
The AFSC said 30 people were stopped by agents and taken into custody while they tried to move forward to offer a ceremonial blessing to start a week of action called "Love Knows No Borders: A moral call for migrant justice."
U.S. Border Patrol spokesman Theron Francisco said 31 people were arrested by Federal Protective Services for trespassing and one was arrested by Border Patrol for assaulting an agent.
More than 400 people, many leaders of churches, mosques, synagogues and indigenous communities, took part in the protest at San Diego’s Border Field State Park, which borders Tijuana, Mexico, according to the AFSC.
The arrests marked the second confrontation with U.S. federal agents since the migrant caravan reached Tijuana in November. U.S. Border Patrol agents fired tear gas at migrants on Nov. 25 after they said they were hit with projectiles thrown from Tijuana.
Thousands of migrants are living in crowded shelters in Tijuana after traveling from Central America to escape poverty and violence. They may have to wait weeks or months to claim asylum at the U.S. border.