India and Pakistan on Saturday agreed to a ceasefire following U.S.-led talks to end the most serious military confrontation between the nuclear-armed rivals in decades.