The nearest relative declines to marry Ruth, so Boaz marries Ruth. Ruth bears Obed. King David is a great-grandson of Boaz and Ruth, and Jesus Christ is also a descendant of Boaz and Ruth.
Ruth 4:1–10, 13, 17, 21–22
1 Then went Boaz up to the gate, and sat him down there: and, behold, the kinsman of whom Boaz spake came by; unto whom he said, Ho, such a one! turn aside, sit down here. And he turned aside, and sat down.
2 And he took ten men of the elders of the city, and said, Sit ye down here. And they sat down.
3 And he said unto the kinsman, Naomi, that is come again out of the country of Moab, selleth a parcel of land, which was our brother Elimelech’s:
4 And I thought to advertise thee, saying, Buy it before the inhabitants, and before the elders of my people. If thou wilt redeem it, redeem it: but if thou wilt not redeem it, then tell me, that I may know: for there is none to redeem it beside thee; and I am after thee. And he said, I will redeem it.
5 Then said Boaz, What day thou buyest the field of the hand of Naomi, thou must buy it also of Ruth the Moabitess, the wife of the dead, to raise up the name of the dead upon his inheritance.
6 And the kinsman said, I cannot redeem it for myself, lest I mar mine own inheritance: redeem thou my right to thyself; for I cannot redeem it.
7 Now this was the manner in former time in Israel concerning redeeming and concerning changing, for to confirm all things; a man plucked off his shoe, and gave it to his neighbour: and this was a testimony in Israel.
8 Therefore the kinsman said unto Boaz, Buy it for thee. So he drew off his shoe.
9 And Boaz said unto the elders, and unto all the people, Ye are witnesses this day, that I have bought all that was Elimelech’s, and all that was Chilion’s and Mahlon’s, of the hand of Naomi.
10 Moreover Ruth the Moabitess, the wife of Mahlon, have I purchased to be my wife, to raise up the name of the dead upon his inheritance, that the name of the dead be not cut off from among his brethren, and from the gate of his place: ye are witnesses this day. . . .
13 So Boaz took Ruth, and she was his wife: and when he went in unto her, the Lord gave her conception, and she bare a son. . . .
17 And the women her neighbours gave it a name, saying, There is a son born to Naomi; and they called his name Obed: he is the father of Jesse, the father of David. . . .
21 And Salmon begat Boaz, and Boaz begat Obed,
22 And Obed begat Jesse, and Jesse begat David.
President Thomas S. Monson said:
“Ruth . . . forsook her people, her kindred, and her country in order to accompany her mother-in-law Naomi—worshipping Jehovah in His land and adopting the ways of His people. How very important was Ruth’s obedience to Naomi and the resulting marriage to Boaz by which Ruth—the foreigner and a Moabite convert—became a great-grandmother of David and therefore an ancestress of Jesus Christ. The book of the Holy Bible that bears her name contains language poetic in style, reflective of her spirit of determination and courage. . . . Yes, Ruth, precious Ruth, was a pioneer.”
(“They Showed the Way,” Ensign, May 1997, 50, 51.)