Police and marathon officials struggled to remove the barriers.