ADDIS ABABA, May 9 (Reuters) - South Sudanese President Salva Kiir and rebel commander Riek Machar agreed a ceasefire deal on Friday, a regional mediator said, after coming under growing international pressure to end ethnic fighting that has raised fears of genocide.

Friday's deal by the two men at a meeting in Ethiopia was the first time they had met face-to-face since violence erupted in mid-December following a long power struggle. Kiir and Machar shook hands and prayed together.

The men also agreed that a transitional government offered the "best chance" to take the country towards elections next year, though there was no immediate decision on who would be part of an interim administration. (Reporting by Aaron Maasho; Writing by Richard Lough; Editing by Robin Pomeroy)