Mahabharata, Sabha Parva 30 (Sahadeva's southern campaign)
Central India · Mahishmati on the NarmadaAll traditions
Sahadeva's troops catch fire before Mahishmati because Agni defends King Nila. The epic explains that Agni had loved Nila's daughter, who alone could make the royal fire blaze; discovered in a brahmin's form, he flared up, was given the princess, and granted that the king's army would never panic. Sahadeva praises Agni with his many names, reminds him not to hinder a sacrifice and sits down on sacred grass. The flames stop at him. Agni says he was testing him and must guard the city as long as Nila's line lasts, then has Nila pay tribute.
Central India · Mahishmati on the NarmadaAll traditions
King Duryodhana of Mahishmati, of the Ikshvaku line, has by the river Narmada a daughter, Sudarshana. Agni asks for her as a poor brahmin and is refused; he vanishes from the king's sacrifice. The priests seek him and he says he wants the princess. The king gladly agrees and asks as bride-gift that Agni stay in Mahishmati always. They have a son, Sudarshana. The text notes that this is why Sahadeva met Agni there.
What is different here:
Different king and a named princess; a proper request and refusal instead of a discovered visit; Agni's leverage is leaving the sacrifice; the boon is his permanent presence, asked by the king.