The two countries had been at an impasse on trade talks for months.