We knocked on the door but nobody answered. But is which part of speech?

We knocked on the door but nobody answered. But is which part of speech?

Explanation
"But" connects two clauses, showing contrast.
Thus, it is a conjunction.