Rogue in Space

Rogue in Space is a science fiction novel by American writer Fredric Brown, first published in 1957. Brown expanded two earlier novelettes ("Gateway to Darkness", published in Super Science Stories in 1949; and "Gateway to Glory", published in Amazing Stories in 1950) to form the novel.

Plot summary
In the book a sentient and powerful asteroid arrives in the solar system's asteroid belt after countless aeons of wandering interstellar space. Passing by another asteroid, the living asteroid makes its first ever encounter with other living beings - a likeable criminal involved in a life-and-death struggle with a corrupt and power-mad judge.

The judge is eventually killed, but so too is his beautiful wife who had allied herself with the criminal, the couple falling in love. Whilst the god-like living asteroid builds a new world around itself, and blocks all mankind's efforts to investigate it, eventually the criminal returns to the planet with a small group. The sentient asteroid allows them to make planetfall, but only the criminal can accept living in the new Eden created for him, and they eventually depart. The alien then resurrects the late judge's wife.

Reception
Floyd C. Gale reviewed the novel unfavorably in Galaxy, saying that the story's logical flaws could have been forgiven "had Brown realized he was writing a funny story and treated it that way. He didn't." Anthony Boucher defined Rogue in Space "a thumping error in judgment," saying the decision to expand "one of [Brown's] least interesting stories to novel length" produced a work that had "lost what small virtues it once possessed, and become slow, ponderous, humorless [and] pretentious."

John Varley's story "Lollipop and the Tar Baby", set in his Eight Worlds future, uses a similar premise - featuring a sentient Black Hole and its interactions with humans.