MDC leader Morgan Tsvangirai , as Zimbabwe 's prime minister , and Mugabe agreed to a power-sharing system , ending months of bitter political deadlock after last year 's elections and bloody aftermath .