Damage caused by police, border patrol, etc. during search: who pays?

In this pit thread, tashabot wrote that the police had a “no-knock” warrant for a neighbor. They busted the door down, found nothing, and did not pay for the damage. I’ve heard stories of people having their cars torn up when crossing the border from Mexico. They were just given the pieces and sent on their way.

None of this has happened to anyone I know, so I ask you all this: How much responsibility do government agents (or more likely the agencies they work for) have when it comes to monetary damages caused by them?

Two previous threads.

Thanks for the links. It seems that if the police are performing a search where they don’t find anything, they’ll pay for what they break.
I still wonder about the BP example. Can the Border Patrol disassemble my car and just leave me with the pile? I’m assuming that the searches they perform at the border have been deamed “reasonable” They’re not really breaking anything. I don’t know how much this actually happens. Maybe it’s just something where everyone in El Paso knows someone who knows someone who has had it happen to them.