Alma 20:21 - 20:25
Alma 20:21 Now when the king saw that Ammon could slay him, he began to plead with Ammon that he would spare his life.
It was not to long that the king realized that it was his life that was in danger and began to plead for his own life.
Alma 20:22 But Ammon raised his sword, and said unto him: Behold, I will smite thee except thou wilt grant unto me that my brethren may be cast out of prison.
Ammon taking advantage that the king was afraid for his life and therefore in a bargaining mood, demanded that his brother and his friends be freed from prison in Middoni.
Alma 20:23 Now the king, fearing he should lose his life, said: If thou wilt spare me I will grant unto thee whatsoever thou wilt ask, even to half of the kingdom.
The king was in so much fear that he was willing to give half of his kingdom if Ammon would not kill him.
Alma 20:24 Now when Ammon saw that he had wrought upon the old king according to his desire, he said unto him: If thou wilt grant that my brethren may be cast out of prison, and also that Lamoni may retain his kingdom, and that ye be not displeased with him, but grant that he may do according to his own desires in whatsoever thing he thinketh, then will I spare thee; otherwise I will smite thee to the earth.
Ammon did not want half of the kingdom (I'm sure the old king would have reneged on the agreement when he was out of danger and had his own troops behind him) but that if the king would see to the release of his brother and his friends, and in addition that Lamoni be given complete autonomy over his own kingdom, Ammmon would spare his life.
Alma 20:25 Now when Ammon had said these words, the king began to rejoice because of his life.
The old king seeing that he had a way to spare his life agreed to Ammon's terms.