Mr. Mubarak temporarily handed over power to Prime Minister Nazif before undergoing surgery in Heidelberg , Germany on March 6 .