1 Kings 17

> 1 Elijah the Tishbite, from Tishbe in Gilead, said to Ahab: “As the
> Lord, the God of Israel, lives, whom I serve, during these years there
> shall be no dew or rain except at my word.”

The phrase "[As the Lord lives](https://forwhatsaiththescriptures.org/2020/09/29/as-the-lord-liveth/)" is very different from "Thus says the Lord." The latter begins a prophecy. The former begins a definitive statement by the speaker, not God. Elijah says, in effect, "A surely as there is a God in Heaven, as certain as day follows night, there will be no rain!"

James apparently thought - or may have been aware of a rabbinical teaching - that Elijah's prophecy was a negative wish, a type of prayer. This is echoed by [Rashi in his commentary](https://www.sefaria.org/I_Kings.17.1?lang=bi&p2=Rashi_on_I_Kings.17.1&lang2=bi&w2=all&lang3=en) on this verse: 

> *As Adonoy [the Lord] lives.* -  Why was this placed here?... Achov said to Eliyahu, “Is it possible that the student’s curse [should be]
> fulfilled while Moshe our teacher’s curse was not fulfilled?

Rashi preserves an ancient tradition in which Ahab challenged Elijah's statement by referring to it a curse. Moses' curses were not always fulfilled, he reasoned; and Elijah is surely not as great as Moses. Whether this is a fact or not, it is supported by Elijah's words: "there shall be no dew or rain except at my word," which can again be interpreted as Elijah's word rather than God's.

**Conclusion**: James refers to Elijah's 'prayer' because although Elijah invoked God's name, his statement was not actually a prophecy. It was an expression of confidence that God would support his ardent negative wish or prayer. Because this wish was in accord with God's will, it did come true.