user12857: I have read that obedience to the five precepts at least guarantees that practitioners will not fall back into the lower worlds (animal world, wandering spirit world, and hell world) when they are reborn after the present life.
So I was wondering if the conversion to Buddhism, the taking of refuge and the beginning to follow the five precepts, "cleansed" the old bad deeds, a bit like baptism among Christians?
Does a person who has violated the five precepts, for example by killing or stealing at the beginning of his life, and then halfway through his life until his death starts following the five precepts, still go to hell? Is he definitely condemned to be reborn in hell for his offense?

user471: The following sutta quote shows that it can be in any order. There's no automatic cleansing of past bad deeds after taking triple refuge and the vow of the precepts.

"Now, Ānanda, in the case of the person who takes life... & holds
wrong view and, with the breakup of the body, after death, reappears
in a plane of deprivation, a bad destination, a lower realm, hell:
Either earlier he performed evil action that is to be felt as painful,
or later he performed evil action that is to be felt as painful, or at
the time of death he adopted & carried out wrong view. Because of
that, with the breakup of the body, after death, he reappears in a
plane of deprivation, a bad destination, a lower realm, hell. And as
for the results of taking life... holding wrong view, he will feel
them either right here & now, or in the next [lifetime], or following
that.
"In the case of the person who takes life... & holds wrong view [yet],
with the breakup of the body, after death, reappears in a good
destination, a heavenly world: Either earlier he performed fine action
that is to be felt as pleasant, or later he performed fine action that
is to be felt as pleasant, or at the time of death he adopted &
carried out right view. Because of that, with the breakup of the body,
after death, he reappears in a good destination, a heavenly world. But
as for the results of taking life... holding wrong view, he will feel
them either right here & now, or in the next [lifetime], or following
that.
"In the case of the person who abstains from taking life... & holds
right view and, with the breakup of the body, after death, reappears
in a good destination, a heavenly world: either earlier he performed
fine action that is to be felt as pleasant, or later he performed fine
action that is to be felt as pleasant, or at the time of death he
adopted & carried out right view. Because of that, with the breakup of
the body, after death, he reappears in a good destination, a heavenly
world. And as for the results of abstaining from taking life...
holding right view, he will feel them either right here & now, or in
the next [lifetime], or following that."
"In the case of the person who abstains from taking life... & holds
right view [yet] with the breakup of the body, after death, reappears
in a plane of deprivation, a bad destination, a lower realm, hell:
Either earlier he performed evil action that is to be felt as painful,
or later he performed evil action that is to be felt as painful, or at
the time of death he adopted & carried out wrong view. Because of
that, with the breakup of the body, after death, he reappears in a
plane of deprivation, a bad destination, a lower realm, hell. But as
for the results of abstaining from taking life... holding right view,
he will feel them either right here & now, or in the next [lifetime],
or following that.
MN 136

However, the suttas do speak of stream entry as the point after which one definitely does not go to lower worlds.

Someone who understands and sees these principles is called a
stream-enterer, not liable to be reborn in the underworld, bound for
awakening.”
SN 25.1


12857: <p>I have read that obedience to the five precepts at least guarantees that practitioners will not fall back into the lower worlds (animal world, wandering spirit world, and hell world) when they are reborn after the present life.</p>
<p>So I was wondering if the conversion to Buddhism, the taking of refuge and the beginning to follow the five precepts, &quot;cleansed&quot; the old bad deeds, a bit like baptism among Christians?</p>
<p>Does a person who has violated the five precepts, for example by killing or stealing at the beginning of his life, and then halfway through his life until his death starts following the five precepts, still go to hell? Is he definitely condemned to be reborn in hell for his offense?</p>
 471: <p>The following sutta quote shows that it can be in any order. There's no automatic cleansing of past bad deeds after taking triple refuge and the vow of the precepts.</p>
<blockquote>
<p>&quot;Now, Ānanda, in the case of the person who takes life... &amp; holds
wrong view and, with the breakup of the body, after death, reappears
in a plane of deprivation, a bad destination, a lower realm, hell:
Either earlier he performed evil action that is to be felt as painful,
or later he performed evil action that is to be felt as painful, or at
the time of death he adopted &amp; carried out wrong view. Because of
that, with the breakup of the body, after death, he reappears in a
plane of deprivation, a bad destination, a lower realm, hell. And as
for the results of taking life... holding wrong view, he will feel
them either right here &amp; now, or in the next [lifetime], or following
that.</p>
<p>&quot;In the case of the person who takes life... &amp; holds wrong view [yet],
with the breakup of the body, after death, reappears in a good
destination, a heavenly world: Either earlier he performed fine action
that is to be felt as pleasant, or later he performed fine action that
is to be felt as pleasant, or at the time of death he adopted &amp;
carried out right view. Because of that, with the breakup of the body,
after death, he reappears in a good destination, a heavenly world. But
as for the results of taking life... holding wrong view, he will feel
them either right here &amp; now, or in the next [lifetime], or following
that.</p>
<p>&quot;In the case of the person who abstains from taking life... &amp; holds
right view and, with the breakup of the body, after death, reappears
in a good destination, a heavenly world: either earlier he performed
fine action that is to be felt as pleasant, or later he performed fine
action that is to be felt as pleasant, or at the time of death he
adopted &amp; carried out right view. Because of that, with the breakup of
the body, after death, he reappears in a good destination, a heavenly
world. And as for the results of abstaining from taking life...
holding right view, he will feel them either right here &amp; now, or in
the next [lifetime], or following that.&quot;</p>
<p>&quot;In the case of the person who abstains from taking life... &amp; holds
right view [yet] with the breakup of the body, after death, reappears
in a plane of deprivation, a bad destination, a lower realm, hell:
Either earlier he performed evil action that is to be felt as painful,
or later he performed evil action that is to be felt as painful, or at
the time of death he adopted &amp; carried out wrong view. Because of
that, with the breakup of the body, after death, he reappears in a
plane of deprivation, a bad destination, a lower realm, hell. But as
for the results of abstaining from taking life... holding right view,
he will feel them either right here &amp; now, or in the next [lifetime],
or following that.<br />
<a href="https://www.accesstoinsight.org/tipitaka/mn/mn.136.than.html" rel="nofollow noreferrer">MN 136</a></p>
</blockquote>
<p>However, the suttas do speak of stream entry as the point after which one definitely does not go to lower worlds.</p>
<blockquote>
<p>Someone who understands and sees these principles is called a
stream-enterer, not liable to be reborn in the underworld, bound for
awakening.”<br />
<a href="https://suttacentral.net/sn25.1/en/sujato?layout=plain&amp;reference=none&amp;notes=asterisk&amp;highlight=false&amp;script=latin" rel="nofollow noreferrer">SN 25.1</a></p>
</blockquote>
