In life, Wagner Figueiredo de Lima and his beloved horse, named Sereno, were inseparable. Sadly though, their time together was recently cut short.

Lima, 34, passed away earlier this week from injuries he suffered in a traffic accident near his home in Paraiba, Brazil — a tragic loss for all who knew him, including the best friend he left behind.

Facebook/Wagner Lima

On Tuesday, dozens of family members and friends gathered for a funeral procession to honor Lima before he was to be laid to rest. Knowing how much his horse had meant to Lima, his brother Wando thought it only fitting that Sereno should be there, too.

But nobody expected what happened next.

Kyioshi Abreu/Portal Diário do Sertão

When the vehicle carrying Lima's coffin arrived to the gathering, Sereno seemed to know it meant his friend was really gone.

"[Sereno] began to walk around the coffin, smelling the coffin. Then he neighed," attendee Kyioshi Abreu told The Dodo. "It was a very strong emotion. Everyone who was there was moved. I cried myself when I saw that scene."

Kyioshi Abreu/Portal Diário do Sertão

Sereno then stooped, and placed his head against the coffin.

Kyioshi Abreu/Portal Diário do Sertão

"This horse was everything to him," Wando told Globo News. "It was as if the horse knew what was happening and wanted to say goodbye."

Kyioshi Abreu/Portal Diário do Sertão

Afterward, Sereno joined the other mourners as they led Lima to his final resting place.

Kyioshi Abreu/Portal Diário do Sertão

There was little doubt that Sereno was heartbroken: "All the way to the cemetery, he would whimper and beat with his hooves on the ground," Wando told the news station.

Kyioshi Abreu/Portal Diário do Sertão

We may never know for certain to what extent the range of animals' emotions mirror our own, but in mourning the loss of a loved one, the perception of a difference can easily fade.

Fortunately, Sereno won't be facing that grieving process alone.

Kyioshi Abreu/Portal Diário do Sertão

Wando has since taken in his late brother's horse to join his own family — ensuring that Lima's legacy of love for Sereno will live on in his new home for many years to come.