Peter Dinklage as Tyrion Lannister in “Game of Thrones.” (Helen Sloan)

Although the show’s future wasn’t much in doubt, fans of HBO’s lavish fantasy series “ Game of Thrones ” can rest a little easier knowing that it will get another season.

On Tuesday, two days after the show’s third-season premiere, HBO announced a fourth season of “Game of Thrones.”

The decision came after the announcement that the show had achieved an audience high of 6.7 million viewers across all three airings of the show Sunday. That topped the previous season premiere by 7 percent.

For fans familiar with the novels by George R.R. Martin that serve as the basis for the series, the third season was planned to cover only the first half of the third book, “A Storm of Swords.” Now, viewers will be able to see at least the rest of the events of that book dramatized on TV.

After the fourth season, however, things will get trickier. When the books were published, Martin divided the fourth and fifth books, “A Feast for Crows” and “A Dance With Dragons,” by characters — with half the story lines in one book and the other half in the other (although there is some blending in the fifth volume).

When those books make it to TV, elements of both novels will be needed to continue the narrative of all the characters.

The show’s executive producers told HitFix that they visited Martin at his home in New Mexico in February to get information on where the series was headed in the final two books.