An ending is automatically elegant if it contains a prayer, even when unrelated to the discourse.

Comprehensive Review and Application: Bayān, Badīʿ and the Final Rhetorical Arts