(CNN) The Senate voted Thursday to confirm Ben Carson and Rick Perry to Cabinet position in President Donald Trump's administration.

The chamber confirmed retired neurosurgeon as the next secretary of Housing and Urban Development, and then later in the afternoon approved the former Texas governor as the next energy secretary.

The vote for Carson was 58-41. The vote for Perry was 62-37.

Both Carson and Perry ran against President Donald Trump during a crowded Republican presidential primary, before dropping out and both eventually endorsing Trump.

Read More