Gov. Andrew M. Cuomo has agreed to a televised debate against his Democratic rival, Cynthia Nixon, on Aug. 29, two weeks before Primary Day on Sept. 13.

The announcement comes after three months of accusations by the Nixon campaign that he was afraid of engaging with her; Mr. Cuomo had refused to debate his primary challenger in 2014.

Ms. Nixon — an actress, activist and first-time political candidate — has been challenging Mr. Cuomo to a debate since May, when she accepted an invitation from WABC and taunted the governor for skipping a debate with Zephyr Teachout, his challenger in the 2014 primary. (At the time, Mr. Cuomo said debates could be a “disservice to democracy.”) But Mr. Cuomo, as in 2014, had demurred, with his staff saying only that they had received and would review multiple invitations.

But while Ms. Nixon, who trails the governor by a wide margin in polls, has made mocking Mr. Cuomo’s noncommitment a motif of her campaign, Mr. Cuomo’s announcement that he had finally agreed to a debate was muted.