It seems the consensus in this thread is it was valid but illicit.
The thing is, though, that if it were
valid, then why would a priest subsequently attempt to baptize you? His attempt should tell you that he had doubts that it was valid. Chances are, he celebrated a
conditional baptism, in which the minister says “if you are not baptized, then I baptize you in the name of the Father and of the Son and of the Holy Spirit.”
However, you wrote something that was interesting. You said that, based on a deacon’s recommendation, you “did it again officially.” Are you sure that means ‘baptism’? With water? Here’s the reason I’m asking: when a person is baptized in an emergency situation, what can follow is something known as “supplying the ceremonies.” In this case, the rest of the entirety of the baptismal rite is conducted in the church. A notation is made in your sacramental records that identifies that this took place. That doesn’t mean that they re-did the baptism, though.
To offer a little more context – and to address the concern about whether I was in imminent danger of dying – while I was not in a plane that was about to crash violently, I did happen to be only two months old and about to be subject to general anesthesia.
The question isn’t whether you’re “in imminent danger of dying.” The phrase used in canon law is
in periculo mortis. This is usually translated “in danger of death”, but it doesn’t imply
imminent danger of death. A soldier who is about to board a transport and head into battle is “
in periculo mortis”, even though he’s not “in imminent danger.” So, the whole “imminent” thing is a red herring – it’s not part of what the Church requires.
The major surgery itself was also life-threatening. It was not an imminent threat of death in the strictest sense, but I would point out that any Catholic of any age is urged to receive last rites if they are about to undergo major surgery. This suggests to me that “major surgery” can be considered “imminent threat of death.”
Nope. ‘Major surgery’ is considered “in periculo mortis”, not “imminent threat of death.” So, don’t let anyone tell you that, since death wasn’t imminent, you couldn’t possibly have been validly baptized.