The clearest example of this that I can think of is in the Mahaparinibbana Sutta (DN 16) where the Buddha was asked (obliquely) by the brahman Vassakara on behalf of King Ajatasattu whether he had a chance at killing off an enemy nation. The Buddha replied with the seven "Conditions of a Nation's Welfare":
At that time the Venerable Ananda was standing behind the Blessed One, fanning him, and the Blessed One addressed the Venerable Ananda thus: "What have you heard, Ananda: do the Vajjis have frequent gatherings, and are their meetings well attended?"
"I have heard, Lord, that this is so."
"So long, Ananda, as this is the case, the growth of the Vajjis is to be expected, not their decline.
"What have you heard, Ananda: do the Vajjis assemble and disperse peacefully and attend to their affairs in concord?"
"I have heard, Lord, that they do."
"So long, Ananda, as this is the case, the growth of the Vajjis is to be expected, not their decline.
"What have you heard, Ananda: do the Vajjis neither enact new decrees nor abolish existing ones, but proceed in accordance with their ancient constitutions?"
"I have heard, Lord, that they do."
"So long, Ananda, as this is the case, the growth of the Vajjis is to
be expected, not their decline.
"What have you heard, Ananda: do the Vajjis show respect, honor,
esteem, and veneration towards their elders and think it worthwhile to
listen to them?"
"I have heard, Lord, that they do."
"So long, Ananda, as this is the case, the growth of the Vajjis is to
be expected, not their decline.
"What have you heard, Ananda: do the Vajjis refrain from abducting
women and maidens of good families and from detaining them?"
"I have heard, Lord, that they refrain from doing so."
"So long, Ananda, as this is the case, the growth of the Vajjis is to
be expected, not their decline.
"What have you heard, Ananda: do the Vajjis show respect, honor,
esteem, and veneration towards their shrines, both those within the
city and those outside it, and do not deprive them of the due
offerings as given and made to them formerly?"
"I have heard, Lord, that they do venerate their shrines, and that
they do not deprive them of their offerings."
"So long, Ananda, as this is the case, the growth of the Vajjis is to
be expected, not their decline.
"What have you heard, Ananda: do the Vajjis duly protect and guard the
arahats, so that those who have not come to the realm yet might do so,
and those who have already come might live there in peace?"
"I have heard, Lord, that they do."
"So long, Ananda, as this is the case, the growth of the Vajjis is to
be expected, not their decline."
Besides being one of the few examples of the Buddha offering advice on how to run a nation (he was the one who taught the Vajjis these conditions), it also shows how the Buddha never did take sides in political struggle; rather than chastising Ajatasattu, he just taught the dhamma as he always did.