The present disclosure relates to a locking mechanism (7) of an armrest assembly for a wheelchair, comprising: an elongated inner arm (9) having a pivot end portion (9a), and a first elongated body (9b) extending from the pivot end portion (9a), an elongated outer profile (11) having a proximal outer profile end face (11a) provided with an axially extending channel (11b) configured to receive the first elongated body (9b), and a distal outer profile end portion (11c), the outer profile (11) being configured to move linearly relative to the inner arm (9), between a proximal position relative to the pivot end portion (9a) and a distal position, a locking handle (13) having a second elongated body (13a) configured to receive the outer profile (11), the locking handle (13) having a proximal locking handle end portion (13b) relative to the pivot end portion (9a) of the inner arm (9) and a distal locking handle end portion (13c), the distal locking handle end portion (13c) being configured to be pivotally attached to the distal outer profile end portion (11c) thereby forming a first pivot connection (7b), wherein the locking handle (13) is configured to pivot about the first pivot connection (7b) relative to the outer profile (11) and the inner arm (9), between a proximal pivot position and a distal pivot position in which the locking handle (13) is pivoted further away from the outer profile (11) than in the proximal pivot position, and a locking structure (15). The locking handle (13) is configured to cause the locking structure (15) to engage with the outer profile (11) and the inner arm (9) to axially interlock the outer profile (11) with the inner arm (9), and wherein the locking handle (13) is configured to move the locking structure (15) from engagement with the outer profile (11) and the inner arm (9) to release the outer profile (11) from axial interlocking with the inner arm (9) when the outer profile (11) is in the proximal position and the locking handle (13)