The awkward dance between Hillary Clinton and Senator Bernie Sanders, her top Democratic primary opponent, is set to conclude on Tuesday, with Mr. Sanders appearing alongside her at a rally in Portsmouth, N.H.

The event, confirmed in a news release put out by the Sanders campaign on Monday morning, could do much to appease Sanders supporters who remain skeptical of Mrs. Clinton as she heads to the party’s convention July 25-28 in Philadelphia. Mrs. Clinton has secured enough delegates for the presidential nomination but is not yet officially the nominee.

The rally, which will be held at Portsmouth High School, in a state where Mr. Sanders defeated Mrs. Clinton by 22 percentage points in a hard-fought February primary, is the result of weeks of private negotiations and policy debates between the Sanders and Clinton camps. While the endorsement event is widely expected to happen, Mrs. Clinton had to reschedule two recent events, one with President Obama and the other with Vice President Joseph R. Biden Jr., because of the shootings in Orlando, Fla., and Dallas.

At the Democratic National Committee platform meeting in Orlando over the weekend, Mr. Sanders and the liberal wing of the Democratic Party promoted issues that had fueled his campaign.